-
Notifications
You must be signed in to change notification settings - Fork 414
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
1.4.x beta: buildOptions() conflicts with required options for Typescript project #612
Comments
Related: there's a similar issue with |
Hi 😉 |
@TMaszko thanks for the quick response. I'll try to provide a repo some time this week. In the mean time, I started working on a PR to address the issue that I'll submit in a few minutes that gives more color to this. |
@TMaszko Here is a reproduction: https://github.com/justjake/linaria-babel-options-issue-repro |
I'm getting build options conflicts in 2.0-rc0 console output
Here's my Babel presets config: '@babel/preset-env',
'@babel/preset-typescript',
'@babel/preset-react',
'linaria/babel', |
I tried again in 2.0.0-rc.1 and I'm not getting them anymore. I also updated the
|
This issue is extremely old, while it has a repro - all versions in it are outdated and it's hard to make the whole thing working. If it's still a problem, please open a new issue and provide reproduction. Thanks. |
Environment
Description
The
buildOptions
function always specifies babel plugin@babel/plugin-transform-modules-commonjs
with no options (defaulting tonoInterop: false
) but my project must be built with['@babel/plugin-transform-modules-commonjs', { noInterop: true }]
.linaria/src/babel/evaluators/buildOptions.ts
Lines 18 to 22 in df7cd17
My project is a large Typescript codebase that does not use
--esModuleInterop
. That means that in our source files, the import syntax for a commonjs module with a single export isimport * as singleExport from 'module-name'
. When our code is pre-processed with @babel/plugin-transform-modules-commonjs, the result of the import statement is now some unexpected value.Concrete example
Reproducible Demo
https://github.com/justjake/linaria-babel-options-issue-repro
The text was updated successfully, but these errors were encountered: