Skip to content

Commit

Permalink
fix(ncc): Fix mode errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 23, 2022
1 parent dbf6b60 commit cc9453d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/ncc/README.md
Expand Up @@ -69,6 +69,12 @@ Example:

Supports `.kktrc.js` and `.kktrc.ts`.

## Example

- [Github Action Contributors](https://github.com/jaywcjlove/github-action-contributors) Github action generates dynamic image URL for contributor list to display it!
- [Generated Badges](https://github.com/jaywcjlove/generated-badges) Create a badge using GitHub Actions (no 3rd parties servers).
- [Coverage Badges](https://github.com/jaywcjlove/coverage-badges-cli) Create coverage badges from coverage reports (no 3rd parties servers).

## Contributors

As always, thanks to our amazing contributors!
Expand Down
3 changes: 2 additions & 1 deletion packages/ncc/src/index.ts
Expand Up @@ -177,9 +177,10 @@ process.on('exit', (code) => {
} else {
conf.devtool = false;
}
conf.module!.exprContextCritical = false;
conf.amd = false;
conf.target = target;
conf.mode = env === 'development' ? 'development' : 'production';
conf.mode = scriptName === 'watch' ? 'development' : 'production';
conf.output = {};
if (argvs.external) conf.externals = argvs.external;
if (conf.output) {
Expand Down

0 comments on commit cc9453d

Please sign in to comment.