-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Change package.json#main to .cjs
file
#228
Conversation
Pull Request Test Coverage Report for Build 28489f544603358a5ed1bfb77bba15d1aeefd089-PR-228Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
We could also change the |
@thysultan sure, that works too - I've pushed out the change. Please remember about clearing |
Can you add that to the build process? i.e before generating the dist files. Does rollup provide an opt for this? |
Rollup itself doesn't have an option for this. I usually just use |
When does |
Its npm scripts, you can add pre and post scripts for any other script. It works with all packaga managers |
We can change the "start" script to "npm run build -- --watch" so it can benefit from this as well. |
Other than that LGTM. |
Done. |
It seems that node@12.16.3 ships with unflagged module support BUT without support for conditional exports, so it just tries to use
"main"
but at the same type it sees"type": "module"
and fails onrequire
ing Stylis because it thinks it's going to load a module and it can't do that when usingrequire
.This node version is used by Vercel and AWS, so it's pretty important for us to support them. The issue can be reproduced with this version of node using this repository: https://github.com/harrisrobin/vercel-deploy-issue