Skip to content
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

restore support for extending babel configuration #817

Conversation

thescientist13
Copy link
Member

Related Issue

#532

Summary of Changes

  1. Restore Babel configuration extend spec
  2. Set babelHelpers to bundled since I got this error and also it seems like the best option anyway 🤷‍♂️
Error: You have declared using "runtime" babelHelpers, but transforming /Users/owenbuckley/Desktop/greenwood/packages/plugin-babel/test/cases/options.extend-config/src/scripts/main.js resulted in "inline". Please check your configuration.

Tried to add ESM config support, e.g

module.exports = {
  plugins: [
    '@babel/plugin-proposal-class-properties',
    '@babel/plugin-proposal-private-methods'
  ]
};

But it ended up leading to a cascade of issues because

  1. When running the spec, was getting this error because... Babel already seems to support ESM
     Parsing error: /path/to/.babelrc.mjs: Error while loading config - You appear to be using a native ECMAScript module configuration file, which is only supported when running Babel asynchronously
  2. In order to import an ESM config, you need to be able to use await
  3. Which means getConfig would have to be async
  4. Which means all usages of getting a provider would need to async
  5. Which means everywhere we are doing "faux" `aysnc, would need to be refactored

So given all that, plan will be to add these to the tracking items in #815

  1. Add Babel as tool to support ESM config
  2. Make an issue to make Greenwood "explicitly" async through and through, and use more for ... in and less reduce 😵

@thescientist13 thescientist13 added chore unit testing, maintenance, etc documentation Greenwood specific docs Plugins Greenwood Plugins breaking labels Dec 8, 2021
@thescientist13 thescientist13 added this to the 1.0 milestone Dec 8, 2021
@thescientist13 thescientist13 linked an issue Dec 8, 2021 that may be closed by this pull request
5 tasks
@thescientist13 thescientist13 merged commit 7f7424e into release/0.20.0 Dec 9, 2021
@thescientist13 thescientist13 deleted the chore/issue-532-restore-babel-plugin-extend-config branch December 9, 2021 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.1 breaking chore unit testing, maintenance, etc documentation Greenwood specific docs Plugins Greenwood Plugins v0.20.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade project codebase to ESM
1 participant