-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwebpack.config.js
43 lines (42 loc) · 944 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
var webpack = require('webpack');
module.exports = {
entry: ['./src/parse.js', './src/tables.ts'],
output: {
filename: 'bundle.js',
libraryTarget: 'var',
library: 'Table'
},
externals: {
},
// Turn on sourcemaps
devtool: 'source-map',
resolve: {
extensions: ['.webpack.js', '.web.js', '.ts', '.js']
},
// Add minification
plugins: [
// new webpack.optimize.UglifyJsPlugin()
new webpack.ProvidePlugin({
jquery: 'jquery',
jQuery: 'jquery',
$: 'jquery'
})
],
module: {
rules: [
{ test: /\.ts$/, use: 'ts-loader' },
{ test: /\.less$/, use: 'style!css!less' },
{ test: /\.css$/, use: "style-loader!css-loader" },
// {
// test: require.resolve('./libs/vega'),
// loaders: [
// 'transform?vega/scripts/strip-schema.js'
// ]
// },
{
test: /\.json$/,
use: 'json-loader'
}
]
}
}