Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit ac1701d

Browse files
author
Chau Tran
committed
fix(tsdx.config.js): disable production build
1 parent 8c5752f commit ac1701d

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules
66
.rts2_cache_umd
77
.rts2_cache_system
88
dist
9+
public

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
},
2525
"scripts": {
2626
"start": "tsdx watch",
27-
"build": "tsdx build",
27+
"build": "tsdx build --format=cjs",
28+
"postbuild": "rm -rf public",
2829
"build:docs": "typedoc --out docs --target es6 --theme minimal --mode file src",
2930
"test": "CI=true tsdx test --no-cache",
3031
"test:cov": "CI=true tsdx test --coverage",

tsdx.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
rollup(config, options) {
3+
if (options.env === 'production') {
4+
config.output.file = 'public/null';
5+
} else {
6+
config.output.file = 'dist/index.js';
7+
}
8+
return config;
9+
},
10+
};

0 commit comments

Comments
 (0)