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:
parent
ba9382e1bd
commit
fa50f3521c
5 changed files with 528 additions and 17 deletions
|
@ -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']
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue