-
Notifications
You must be signed in to change notification settings - Fork 68
/
webpack.config.js
41 lines (41 loc) · 1.02 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
/*global require,module,__dirname*/
const path = require('path')
// console.log('asdf',path.join(__dirname, 'dist')) // todo: remove log
module.exports = {
entry: './doc/js/main.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'distdoc/js')
},
/*entry: {
main: ['./src/tinysort.js'/!*, './src/tinysort.charorder.js', './src/jquery.tinysort.js'*!/],
docs: './doc/js/main.js'
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].min.js'
},*/
mode: 'production',
devtool: 'source-map',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'stage-0', 'minify']
}
// include: path.join(__dirname, 'src/js'),
// babelrc: false,
// query: {
// presets: ['es2015'],
// plugins: [
// ["transform-object-rest-spread"],
// ["transform-react-display-name"],
// ],
// }
}
]
}
}