-
Notifications
You must be signed in to change notification settings - Fork 18
fix loading babel options for @babel/plugin-proposal-decorators #237
fix loading babel options for @babel/plugin-proposal-decorators #237
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
#240 fixes CI |
); | ||
|
||
if (index > -1) { | ||
opts.parserOpts.plugins.splice(index, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removes the decorators
plugin to make loadBabelOpts()
respect user's .babelrc
.
Line 97 in 09af2eb
['decorators', { decoratorsBeforeExport: false }], |
CI fixed💪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@puku0x Thanks for creating the PR! Could you please add a test case for the change?
I'll add a test case for the fix. |
Test case added. |
package.json
Outdated
@@ -74,6 +74,7 @@ | |||
"@babel/core": ">=7.15.5" | |||
}, | |||
"devDependencies": { | |||
"@babel/plugin-proposal-decorators": "^7.16.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This babel plugin is needed for the test I added because it loads @babel/plugin-proposal-decorators
from the generated .babelrc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@puku0x Thank you so much! LGTM 👍🏼
@abdonrd Could you please review this pull request if you have time? |
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
I rebased this branch to |
|
Fixes #236
This PR solves the problem when
@stylelint/postcss-css-in-js
is used with.babelrc
which has@babel/plugin-proposal-decorators
that results the following error.Note the error is not displayed on the console because
extract.js
ignores errors during pursing the babel options.