mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Rework Webpack config
This commit is contained in:
parent
bfb8c7c1f6
commit
96eccd2ecd
7 changed files with 1034 additions and 1236 deletions
|
@ -1,18 +1,20 @@
|
|||
const path = require('path');
|
||||
const common = require('./webpack.common');
|
||||
const merge = require('webpack-merge');
|
||||
const packageConfig = require('./package.json');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
output: {
|
||||
filename: 'bundle.js',
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
libraryTarget: 'amd-require'
|
||||
},
|
||||
devtool: 'inline-source-map',
|
||||
entry: './scripts/standalone.js',
|
||||
devtool: 'source-map',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(html)$/,
|
||||
use: {
|
||||
loader: 'html-loader'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules[\\/](?!date-fns|epubjs|libarchive|jellyfin-apiclient|query-string|split-on-first|strict-uri-encode|xmldom)/,
|
||||
|
@ -39,7 +41,7 @@ module.exports = merge(common, {
|
|||
]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpg|gif)$/i,
|
||||
test: /\.(png|jpg|gif|svg)$/i,
|
||||
use: ['file-loader']
|
||||
},
|
||||
{
|
||||
|
@ -53,5 +55,11 @@ module.exports = merge(common, {
|
|||
use: ['file-loader']
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html'
|
||||
})
|
||||
]
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue