webpack config and package.json for yarn

This commit is contained in:
vitorsemeano 2019-04-28 11:38:30 +01:00
parent 0785e6b36c
commit ec387c5246
3 changed files with 365 additions and 3 deletions

35
webpack.config.js Normal file
View file

@ -0,0 +1,35 @@
const path = require('path');
module.exports = {
context: __dirname + '/src',
entry: './scripts/site.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
modules: [
path.resolve(__dirname, 'src/scripts'),
path.resolve(__dirname, 'src/components'),
path.resolve(__dirname, 'src/components/playback'),
path.resolve(__dirname, 'src/components/emby-button'),
path.resolve(__dirname, 'src/components/usersettings'),
path.resolve(__dirname, 'src/components/images'),
path.resolve(__dirname, 'src/bower_components'),
path.resolve(__dirname, 'src/bower_components/apiclient'),
path.resolve(__dirname, 'src/bower_components/apiclient/sync'),
path.resolve(__dirname, 'src/components/cardbuilder'),
'node_modules'
]
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
}
};