Skip to content

Commit 29e46a8

Browse files
committedJul 28, 2019
build: ts and webpack config
1 parent da8d5a9 commit 29e46a8

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
 

‎tsconfig.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": [
5+
"es2015",
6+
"es2016"
7+
],
8+
"module": "commonjs",
9+
"declaration": true,
10+
"outDir": "./lib",
11+
"strict": true
12+
},
13+
"include": [
14+
"src/index.ts",
15+
"test/index.ts",
16+
]
17+
}

‎webpack.config.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
var webpack = require('webpack');
2+
var path = require('path');
3+
4+
module.exports = [{
5+
entry: path.join(__dirname, 'lib', 'src', 'index.js'),
6+
mode: 'production',
7+
optimization: {
8+
minimize: true
9+
},
10+
output: {
11+
path: path.join(__dirname, 'dist'),
12+
filename: 'merge.browser.min.js',
13+
libraryExport: 'default',
14+
libraryTarget: 'var',
15+
library: 'merge'
16+
}
17+
}, {
18+
entry: path.join(__dirname, 'lib', 'test', 'index.js'),
19+
mode: 'production',
20+
optimization: {
21+
minimize: false
22+
},
23+
output: {
24+
path: path.join(__dirname, 'dist'),
25+
filename: 'merge.browser.test.js'
26+
},
27+
externals: {
28+
chai: 'chai'
29+
}
30+
}]

0 commit comments

Comments
 (0)
Please sign in to comment.