-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
38 lines (37 loc) · 991 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
32
33
34
35
36
37
38
const path = require( 'path' );
const webpack = require( 'webpack' );
const BrowserSyncPlugin = require('browser-sync-webpack-plugin')
const LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
mode: 'none',
entry: {
'klaro.bundle': path.resolve( __dirname, './build/CookieConsent/js/klaro.js' ),
'klaro.min': path.resolve( __dirname, './build/CookieConsent/js/klaro.js' ),
},
output: {
path: path.resolve(__dirname, './build/CookieConsent/_files/js/lh/cookieconsent/'),
filename: '[name].js',
},
plugins: [
new BrowserSyncPlugin({
proxy: 'localhost',
files: ['build/CookieConsent/**/*.php'],
open: false,
}),
new LodashModuleReplacementPlugin(),
new UglifyJsPlugin({
include: /\.min\.js$/,
})
],
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
}
]
},
watch: true
}