-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathwebpack.config.js
50 lines (46 loc) · 992 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
39
40
41
42
43
44
45
46
47
48
49
50
// var webpack = require('webpack')
var path = require('path')
var srcDir = path.resolve(__dirname, 'src')
var jsDir = srcDir
// var stylesDir = srcDir + '/styles';
var buildDir = path.resolve(__dirname, 'dist')
// var prod = process.env.NODE_ENV === 'production'
var config = {
entry: jsDir + '/paratii.js',
output: {
path: buildDir,
filename: 'paratii.min.js',
library: 'paratiijs',
libraryTarget: 'var'
},
resolve: {
alias: {
fs: 'browserify-fs'
// styles: stylesDir,
}
},
node: {
fs: 'empty',
child_process: 'empty',
net: 'empty',
tls: 'empty'
},
target: 'web',
module: {
loaders: [{
test: /\.js$/,
include: [
srcDir
],
exclude: [
/node_modules/
],
loader: 'babel-loader',
options: {
presets: ['es2015'],
plugins: ['syntax-dynamic-import', 'syntax-async-functions', 'transform-regenerator']
}
}]
}
}
module.exports = config