jellyfin-web/webpack.dev.js

58 lines
1.6 KiB
JavaScript
Raw Normal View History

2020-05-04 03:44:12 -07:00
const path = require('path');
const common = require('./webpack.common');
const merge = require('webpack-merge');
2020-05-06 07:02:56 -07:00
const packageConfig = require('./package.json');
2019-09-30 13:51:46 -07:00
module.exports = merge(common, {
2020-05-04 03:44:12 -07:00
mode: 'development',
2019-09-30 13:51:46 -07:00
output: {
2020-05-04 03:44:12 -07:00
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'amd-require'
2019-09-30 16:58:05 -07:00
},
2020-03-31 07:56:12 -07:00
devtool: 'inline-source-map',
2019-09-30 16:58:05 -07:00
module: {
rules: [
2020-02-28 06:36:42 -07:00
{
test: /\.js$/,
2020-05-27 00:41:42 -07:00
exclude: /node_modules[\\/](?!date-fns|jellyfin-apiclient|query-string|split-on-first|strict-uri-encode)/,
2020-05-06 07:02:56 -07:00
use: {
loader: 'babel-loader',
options: {
presets: packageConfig.babel.presets
}
}
2020-02-28 06:36:42 -07:00
},
2019-09-30 16:58:05 -07:00
{
test: /\.css$/i,
2020-05-06 07:02:56 -07:00
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
2020-05-08 03:50:04 -07:00
options: {
config: {
path: __dirname
}
}
2020-05-06 07:02:56 -07:00
}
]
2019-09-30 16:58:05 -07:00
},
{
test: /\.(png|jpg|gif)$/i,
2020-05-04 03:44:12 -07:00
use: ['file-loader']
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: [
2020-04-25 05:07:20 -07:00
'file-loader'
]
2020-04-15 09:09:34 -07:00
},
{
2020-05-05 03:01:43 -07:00
test: /\.(mp3)$/i,
use: ['file-loader']
2019-09-30 16:58:05 -07:00
}
]
2020-02-28 01:01:22 -07:00
}
2019-09-30 13:51:46 -07:00
});