Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: setup build generation and rebuild latest dist #81

Merged
merged 4 commits into from
Jan 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"lint": "eslint src",
"test": "jest src",
"build": "rm -rf build && ncc build --minify"
"build": "rm -rf build && ncc build index.js -o dist --minify"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also dug a bit into this. It seems like ncc has some kind of cache which would result in outdated builds. Even passing no-cache to the CLI doesn't make a difference.

But I noticed the above script is wrong: The folder for the built assets isn't called "build", but "dist". It seems like once that is fixed, the script works as expected.

Suggested change
"build": "rm -rf build && ncc build index.js -o dist --minify"
"build": "rm -rf dist && ncc build"

},
"repository": {
"type": "git",
Expand Down