jellyfish-web/webpack.common.js

33 lines
783 B
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')
}
};