-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
Unable to use .babelrc when symlinking to a directory above #179
Comments
Having the same issue when using symlinks while other loaders (e.g. style, css, sass) all work fine. Similar to #166 as well. |
For what it's worth, I managed to solve the issue of loading a parent directory by splitting my Webpack config for files in the current directory and files in the parent directory:
Tested with the following dependencies:
Relevant: http://discuss.babeljs.io/t/solved-how-do-we-make-babel-ignore-babelrc-when-used-in-webpack/147 Make sure you have npm installed the required Babel presets. |
This hack worked for me: const babelSettings = {
extends: path.join(__dirname, '/.babelrc')
}
...
loader: 'babel?' + JSON.stringify(babelSettings) |
I use a custom .babelrc file like that: With babelrc=false you ask to do not use .babelrc |
@rybon 's solution worked for me and imported modules like
|
I'm triaging old issues on babel-loader. Since this has been inactive for ages, I'm going to close it. Feel free to re-open if there's still something to discuss, but I'm assuming at this point it's been too long to address in a useful way. |
My project's folder structure is like this:
Where
symlinked-js
is a symlink to theparent-js
directory up a level.This directory structure is not compatible with babel-loader with babel 6 but was compatible with babel 5. With this structure, when babel 6 tries to load
./../js/root.js
I get the following failure:So basically, the webpack loader for that file is missing.
I can get around this if I stop using
.babelrc
and set aquery
with all my configurations right on theloader
config in Webpack. And additionally, I need to install all the same modules again in the root folder. So I end up with this:Note the double
node_modules
it requires me to have in the root.Is this change done by design in Babel 6? It makes our life more complicated.
The text was updated successfully, but these errors were encountered: