1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add webpack bundle for external dependencies

This commit is contained in:
Bill Thornton 2019-05-22 15:18:17 -04:00
parent ba9382e1bd
commit fa50f3521c
5 changed files with 528 additions and 17 deletions

View file

@ -2,12 +2,19 @@ const path = require('path');
module.exports = {
context: __dirname + '/src',
entry: './scripts/site.js',
entry: './bundle.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'amd'
},
externals: [{
jquery: {
amd: "jQuery"
}
}],
resolve: {
modules: [
path.resolve(__dirname, 'src/scripts'),
@ -20,16 +27,20 @@ module.exports = {
path.resolve(__dirname, 'src/bower_components/apiclient'),
path.resolve(__dirname, 'src/bower_components/apiclient/sync'),
path.resolve(__dirname, 'src/components/cardbuilder'),
'node_modules'
path.resolve(__dirname, 'node_modules')
]
},
module: {
rules: [
{
test: /\.css$/,
test: /\.css$/i,
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|jpg|gif)$/i,
use: ['file-loader']
}
]
}
};
};