mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 18:08:17 -07:00
44 lines
1.0 KiB
JavaScript
44 lines
1.0 KiB
JavaScript
const path = require('path');
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = {
|
|
context: path.resolve(__dirname, 'src'),
|
|
target: 'web',
|
|
resolve: {
|
|
modules: [
|
|
path.resolve(__dirname, 'node_modules')
|
|
]
|
|
},
|
|
plugins: [
|
|
new CleanWebpackPlugin(),
|
|
new CopyPlugin({
|
|
patterns: [
|
|
{
|
|
from: 'config*.json',
|
|
to: '/'
|
|
},
|
|
{
|
|
from: 'themes/',
|
|
to: 'themes/'
|
|
}
|
|
]
|
|
})
|
|
],
|
|
output: {
|
|
filename: '[name].bundle.js',
|
|
path: path.resolve(__dirname, 'dist')
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: require.resolve('jquery'),
|
|
loader: 'expose-loader',
|
|
options: {
|
|
exposes: ['$', 'jQuery']
|
|
}
|
|
}
|
|
]
|
|
}
|
|
};
|