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.

Esmodule options in rollup output is always undefined

See original GitHub issue

Hi,

While working on #468 I noticed this line of code

esModule: tsconfigJSON ? tsconfigJSON.esModuleInterop : false,

But esModuleInterop is a compiler option so I guess it should be

esModule: Boolean(tsconfigJSON?.compilerOptions?.esModuleInterop)

I can create a PR to fix this I just want to be sure that I’m not missing something here…

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
agilgur5commented, Mar 11, 2020

No need to apologize, 2 days to respond is pretty normal. I just wanted to get all the tsconfig changes & tests done in one go

1reaction
agilgur5commented, Jan 29, 2020

Oh sh*t, you’re right, that’s actually my code from #327 😨 . We don’t have automated tests for tsconfig properties (we should! for #468 too preferably), but I actually have a fork of TSDX I used specifically for this feature and it worked there… 😖 🤔 🤔

Let me take a look at it when I get the chance. This syntax is preferred though.

I’m also working on adding tests for custom babel config (c.f. #443 ); custom tsconfig is actually easier (no new dependencies).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Undefined exported __moduleExports · Issue #266 - GitHub
Not really sure. Try to roll a mix of ES6 modules and CJS modules that require named export '__moduleExports' when your main package.js...
Read more >
rollup.js
To build different bundles with the same input, you supply an array of output options for each input: // rollup.config.js (building more than...
Read more >
rollup.JS and "'this' keyword is equivalent to 'undefined'
'this' keyword is equivalent to 'undefined' ; ES module ; node_modules\@angular\forms\@angular\forms.es5 ; 1:25 ; var __extends = (this ...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Look at the Bundled Output. What makes Rollup powerful is the fact that it uses “tree-shaking”, which leaves out unused code in the...
Read more >
TSConfig Option: esModuleInterop - TypeScript
This mis-match causes these two issues: the ES6 modules spec states that a namespace import ( import * as x ) can only...
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