[next] esm build not in dist
See original GitHub issueHi team,
I’m migrating from chart.js v2 to v3 and I’m looking forward to have good ESM and treeshaking support.
I’ve been using this plugin so I tried the 2.0.0-rc
.
It works but my the ESM file referenced in the package.json is not in my node_modules
after installation.
This means my rollup configuration:
- picks up the default CJS file in dist
- which does a
require('chart.js')
- which imports the whole lib
- and thus prevents treeshaking
I may be mistaken but I think the rollup config is in conflict here: https://github.com/chartjs/chartjs-plugin-datalabels/blob/next/rollup.config.js#L48
How can I help?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Setting a custom build directory - next.config.js
Setting a custom build directory. You can specify a name to use for a custom build directory to use instead of .next ....
Read more >Where Does Nextjs Put Build Folder? - Upmostly
Build. To build your NextJS project you need to run the build command. $ npm run build. in the root directory of your...
Read more >How to generate build files in next js - Stack Overflow
I am learning basic next js. If we run npm run build create-react-app will generate build folder index.html and bundle files. In next...
Read more >Understanding next build and the deployment process #14339
Hi all, I'm wondering if someone can help me "think in Next.js" around the process of build & deployment. My question is, I...
Read more >Next.js build is failing - Render community
Error: Could not find a production build in the '/opt/render/project/src/.next' directory. Try building your app with 'next build' before ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are awesome, thanks very much Simon 😍👍👏
This is fixed by 0870ebe, released in v2.0.0-rc.1.
The ESM build is now correctly: