-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
31 lines (31 loc) · 910 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = ({ mode }) => {
return {
mode,
output: {
path: __dirname + '/dist',
publicPath: '/',
filename: 'es-searchui-wc.js'
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
minify: false
}),
new CopyWebpackPlugin([
{
context: 'node_modules/@webcomponents/webcomponentsjs',
from: '**/*.js',
to: 'webcomponents'
}
])
],
module: {
rules: [
{ test: /\.css$/, use: 'raw-loader' }
]
},
devtool: mode === 'development' ? 'source-map' : 'none'
};
};