2020-05-04 03:44:12 -07:00
|
|
|
const common = require('./webpack.common');
|
2021-06-14 21:44:00 -07:00
|
|
|
const { merge } = require('webpack-merge');
|
2019-09-30 13:51:46 -07:00
|
|
|
|
|
|
|
module.exports = merge(common, {
|
2022-03-31 11:03:02 -07:00
|
|
|
// In order for live reload to work we must use "web" as the target not "browserslist"
|
2021-10-01 03:11:47 -07:00
|
|
|
target: process.env.WEBPACK_SERVE ? 'web' : 'browserslist',
|
2020-05-04 03:44:12 -07:00
|
|
|
mode: 'development',
|
2022-09-05 22:45:59 -07:00
|
|
|
entry: { 'main.jellyfin': './scripts/site.js' },
|
2022-09-06 06:54:50 -07:00
|
|
|
devtool: 'eval-cheap-module-source-map',
|
2019-09-30 16:58:05 -07:00
|
|
|
module: {
|
|
|
|
rules: [
|
2020-10-17 11:09:56 -07:00
|
|
|
{
|
2022-03-31 11:03:02 -07:00
|
|
|
test: /\.(js|jsx|ts|tsx)$/,
|
2021-08-10 09:42:57 -07:00
|
|
|
exclude: /node_modules/,
|
2020-10-17 11:09:56 -07:00
|
|
|
enforce: 'pre',
|
|
|
|
use: ['source-map-loader']
|
2020-10-19 12:25:58 -07:00
|
|
|
}
|
2019-09-30 16:58:05 -07:00
|
|
|
]
|
2020-08-15 03:44:52 -07:00
|
|
|
},
|
2020-08-16 11:24:45 -07:00
|
|
|
devServer: {
|
2021-09-04 22:23:06 -07:00
|
|
|
compress: true,
|
|
|
|
client: {
|
|
|
|
overlay: {
|
|
|
|
errors: true,
|
|
|
|
warnings: false
|
|
|
|
}
|
|
|
|
}
|
2020-08-16 11:24:45 -07:00
|
|
|
}
|
2019-09-30 13:51:46 -07:00
|
|
|
});
|