question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESM module is not minified in v0.7.2

See original GitHub issue

Current Behavior

Only one ESM module (“.esm.js") is generated instead of ".esm.production.js” or “*.esm.development.js”

current behavior

I’ve also tried to pass the --format cjs,esm,udm but only one ESM file is generated.

one esm

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.

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:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jaredpalmercommented, Jun 22, 2019

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

1reaction
TrySoundcommented, Jun 21, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found