1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/webpack.common.js

44 lines
1 KiB
JavaScript
Raw Normal View History

2020-05-04 12:44:12 +02:00
const path = require('path');
2020-08-15 12:44:52 +02:00
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
2020-08-16 20:24:45 +02:00
const CopyPlugin = require('copy-webpack-plugin');
2020-05-29 23:32:45 +02:00
module.exports = {
2020-05-04 12:44:12 +02:00
context: path.resolve(__dirname, 'src'),
2020-08-15 12:44:52 +02:00
target: 'web',
resolve: {
modules: [
2020-05-04 12:44:12 +02:00
path.resolve(__dirname, 'node_modules')
]
2019-05-25 00:28:06 -04:00
},
2019-10-01 02:58:05 +03:00
plugins: [
2020-08-16 20:24:45 +02:00
new CleanWebpackPlugin(),
new CopyPlugin({
patterns: [
{
from: 'config*.json',
to: '/'
},
{
from: 'themes/',
to: 'themes/'
}
]
})
2020-08-15 12:44:52 +02:00
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
2020-10-18 15:29:40 +01:00
},
module: {
rules: [
{
test: require.resolve('jquery'),
loader: 'expose-loader',
options: {
exposes: ['$', 'jQuery']
}
}
]
2020-08-15 12:44:52 +02:00
}
};