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

Cannot specify babel path in stealconfig #1519

Open
1 of 5 tasks
donkeybanana opened this issue May 26, 2020 · 0 comments
Open
1 of 5 tasks

Cannot specify babel path in stealconfig #1519

donkeybanana opened this issue May 26, 2020 · 0 comments

Comments

@donkeybanana
Copy link

donkeybanana commented May 26, 2020

How often can you reproduce it?

  • Always
  • Sometimes
  • Rarely
  • Unable
  • I didn’t try

Description:

https://stealjs.com/docs/StealJS.babel.html#specifying-version states:

If you have a code-base that needs a specific version of Babel you can include it using paths config.

I have tried doing so for both npm config and stealconfig.js approaches.

Looks like this line is the culprit https://github.com/stealjs/steal/blob/master/steal.js#L6889 as replacing with the following results in the paths override working correctly:

setIfNotPresent(this.paths,"babel", dirname+"/ext/babel.js");

Steps to reproduce:

  1. npm install -S steal@2 babel-standalone
  2. Configure paths as per https://stealjs.com/docs/StealJS.babel.html#specifying-version
  3. Create and load an ES module so it is transpiled (and therefore Babel is loaded)
{
  "steal": {
    "paths": {
      "babel": "node_modules/babel-standalone/babel.js"
    }
  }
}

Expected results:

Babel is loaded from node_modules/babel-standalone/babel.js.

Actual results:

Babel is loaded from node_modules/steal/ext/babel.js.

Environment:

Software Version
Steal version "steal": "^2.2.4"
Steal-tools version "steal-tools": "^2.2.6"
node -v v12.16.3
npm -v 6.14.4
Browser Chrome
Operating system 5.4.40-1-MANJARO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant