Skip to content

Commit

Permalink
Merge pull request #644 from MBearo/master
Browse files Browse the repository at this point in the history
build: 修改引用 main 入口,根据环境变量判断引用的包
  • Loading branch information
errorrik committed Aug 4, 2021
2 parents f4ea78f + c222d6e commit f74fc48
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
dist/*.js
dist/san.*
dist/*.gz
dist/*.map
.idea/
Expand Down
5 changes: 5 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if (process.env.NODE_ENV === 'production') {
module.exports = require('./san.min.js');
} else {
module.exports = require('./san.dev.js');
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"report-cov": "cat ./coverage/report-lcov/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
},
"types": "types",
"main": "dist/san.dev.js",
"browser": "dist/san.dev.js",
"main": "dist/index.js",
"browser": "dist/index.js",
"unpkg": "dist/san.min.js",
"files": [
"src",
Expand Down

0 comments on commit f74fc48

Please sign in to comment.