ESM module is not minified in v0.7.2
See original GitHub issueCurrent Behavior
Only one ESM module (“.esm.js") is generated instead of ".esm.production.js” or “*.esm.development.js”
I’ve also tried to pass the --format cjs,esm,udm
but only one ESM file is generated.
Expected behavior
Two ESM files (production & development) should be generated.
Suggested solution(s)
Generate prod/dev files where “dev” is minified.
Additional context
Previous version (0.6.1) used to generate prod/dev versions.
- Unpkg of my library - https://unpkg.com/react-use-localstorage@3.1.2-alpha.1/dist/
- package.json file with tsdx v0.6.1 - https://unpkg.com/react-use-localstorage@3.1.2-alpha.1/package.json
Your environment
Software | Version(s) |
---|---|
TSDX | 0.7.2 |
TypeScript | 3.5.2 |
Browser | N/A |
npm/Yarn | yarn version 1.16.0 |
Operating System | Windows 10 build 1903 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Failed to minify the code from this file - Stack Overflow
npm run build fails to minify Before react-scripts@2.0.0 , this problem was caused by third party node_modules using modern JavaScript ...
Read more >commonjs-everywhere | Yarn - Package Manager
CommonJS (node module) browser bundler with source maps from the minified JS bundle to the original source, aliasing for browser overrides, ...
Read more >Release Notes | Firebase - Google
This page provides a changelog that lists new SDK releases and describes updates to the Firebase console and Firebase services.
Read more >JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >Installation – three.js docs
js, the most popular choice is webpack. Not all features are accessed directly through the three module (also called a "bare import"). Other...
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
Tbh I copied the esm setup from microbundle which I think builds minified esm. Maybe so you can use
<script type=module>
or something idk? Anyways. It is working as expected. It’s up to your app to optimize it@dance2die You may use any bundler. All of them supports NODE_ENV replacement and minification.
There is not way to deliver two production and development bundles to user without requirement to manually alias paths. So we provide a single bundle which user bundler should process.