-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
46 lines (45 loc) · 1.04 KB
/
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
39
40
41
42
43
44
45
46
var webpack = require('webpack')
module.exports = {
mode: 'development',
entry: ['@babel/polyfill', `${__dirname}/web/js/entry.js`],
output: {
path: `${__dirname}/web/scripts`,
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components)/,
include: [
`${__dirname}/frontend`,
`${__dirname}/web/js`,
`${__dirname}/web/js2`
],
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
resolve: {
alias: {
vue$: 'vue/dist/vue.esm.js'
},
extensions: ['*', '.js', '.jsx', '.vue'],
modules: [`${__dirname}/node_modules`],
descriptionFiles: ['package.json'],
mainFields: ['main', 'browser'],
mainFiles: ['index']
},
plugins: [new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)],
performance: {
hints: false
},
devtool: 'source-map'
}