Skip to content

Forcing babel-loader 7.1 and updating resolve-rc for new argument #41

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

Merged
merged 2 commits into from
Jun 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class WebpackConfig {
}

if (this.doesBabelRcFileExist()) {
throw new Error('configureBabel() cannot be called because your app has a .babelrc file. Either put all of your Babel configuration in that file, or delete it and use this function.');
throw new Error('configureBabel() cannot be called because your app already has Babel configuration (a `.babelrc` file, `.babelrc.js` file or `babel` key in `package.json`). Either put all of your Babel configuration in that file, or delete it and use this function.');
}

this.babelConfigurationCallback = callback;
Expand Down
2 changes: 1 addition & 1 deletion lib/config/parse-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = function(argv, cwd) {
runtimeConfig.helpRequested = true;
}

runtimeConfig.babelRcFileExists = (typeof resolveRc(runtimeConfig.context)) !== 'undefined';
runtimeConfig.babelRcFileExists = (typeof resolveRc(require('fs'), runtimeConfig.context)) !== 'undefined';

return runtimeConfig;
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"homepage": "https://github.com/symfony/webpack-encore",
"dependencies": {
"babel-core": "^6.24.0",
"babel-loader": "^7.0.0",
"babel-loader": "^7.1.0",
"babel-preset-env": "^1.2.2",
"chalk": "^1.1.3",
"clean-webpack-plugin": "^0.1.16",
Expand Down
2 changes: 1 addition & 1 deletion test/WebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe('WebpackConfig object', () => {

expect(() => {
config.configureBabel(() => {});
}).to.throw('configureBabel() cannot be called because your app has a .babelrc file');
}).to.throw('configureBabel() cannot be called because your app already has Babel configuration');
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/config/parse-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function createTestDirectory() {
const projectDir = testSetup.createTestAppDir();
fs.writeFileSync(
path.join(projectDir, 'package.json'),
''
'{}'
);

return projectDir;
Expand Down
Loading