-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
55 lines (53 loc) · 1.19 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
47
48
49
50
51
52
53
54
55
// Webpack
require('webpack');
// Modules
const path = require('path');
// Configuration
module.exports = {
mode: 'production',
entry: path.resolve(__dirname, 'assets/js/main-transitions.js'),
output: {
path: path.resolve(__dirname, 'assets', 'js'),
publicPath: '{{ site.url }}/assets/js/',
filename: 'main.js'
},
module: {
rules: [
{
test: /\.js$/,
include: [
path.resolve('src'),
path.resolve('..', 'src')
],
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: [
['@babel/preset-env', {
targets: {
browsers: [
'> 0.25%',
'edge >= 14',
'not ie <= 10',
'not op_mini all'
]
},
corejs: 3,
useBuiltIns: 'usage'
}]
],
plugins: ['@babel/plugin-syntax-dynamic-import']
}
}
}
]
},
resolve: {
alias: {
'highway': 'build/highway.js'
},
modules: ['.', 'node_modules'],
extensions: ['.js']
}
};