jellyfin-web/webpack.common.js
2020-11-05 23:16:50 +00:00

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']
}
}
]
}
};