You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
webpack.config.babel.js imports a file from outside /client "../helpers/settings.js"
With babel 6 it was okay, with babel 7 @babel/register must set "mode" to "upward-optional" (or upward) if you want babel to transpile files outside its root (which is determined by package.json).
So in my case importing a file outside from "client"
What is the expected behavior?
Being able to import from outside a folder with a package.json with babel 7.0 What is motivation or use case for adding/changing the behavior?
Babel 7 changed the behaviour, one needs to use upwad-optional/upward for babel 7. How should this be implemented in your opinion?
Update to interpret to 2.0 (my PR brought upward-option for babel register of babel 7.0 gulpjs/interpret#58)
Are you willing to work on this yourself?
yes
The text was updated successfully, but these errors were encountered:
evenstensberg
changed the title
Update interpret to 2.0 (to have upward-optional for babel 7.0)
[ENHANCEMENT]: Update interpret to 2.0 (to have upward-optional for babel 7.0)
Nov 6, 2019
215e233a updated the interpret. I don't see a release yet so I'm going to test against the next branch to test if I can finally do what I wanted to do (which mean use ESNext syntax like import/export in files imported from babel config files)
Even installing webpack-cli from github, what I want to do still does not work. If I import from client/webpack.config.babel.js a file from outside client it won't parse the ES6 syntax through babel so export and import will fail.
Babel 7 now has a scope for the files it compiles which is determined by package.json.
I'll give my project as an example :
webpack.config.babel.js
imports
a file from outside /client "../helpers/settings.js"With babel 6 it was okay, with babel 7 @babel/register must set "mode" to "upward-optional" (or upward) if you want babel to transpile files outside its root (which is determined by package.json).
So in my case importing a file outside from "client"
What is the expected behavior?
Being able to import from outside a folder with a package.json with babel 7.0
What is motivation or use case for adding/changing the behavior?
Babel 7 changed the behaviour, one needs to use upwad-optional/upward for babel 7.
How should this be implemented in your opinion?
Update to interpret to 2.0 (my PR brought upward-option for babel register of babel 7.0 gulpjs/interpret#58)
Are you willing to work on this yourself?
yes
The text was updated successfully, but these errors were encountered: