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

Doesn't support multiple configs (no error) #109

Closed
tonybart1337 opened this issue Jan 17, 2017 · 1 comment · Fixed by #151
Closed

Doesn't support multiple configs (no error) #109

tonybart1337 opened this issue Jan 17, 2017 · 1 comment · Fixed by #151

Comments

@tonybart1337
Copy link

tonybart1337 commented Jan 17, 2017

I don't know if this module should support multiple configs, but there is another bug with error.

import config1 from './foo.config';
import config2 from './bar.config';

export default [
  config1,
  config2,
];
Error
    at webpack (C:\Projects\clicker-api\node_modules\webpack\lib\webpack.js:19:9)
    at createCompiler (C:\Projects\clicker-api\node_modules\mocha-webpack\lib\webpack\compiler\createCompiler.js:18:40)
    at TestRunner.<anonymous> (C:\Projects\clicker-api\node_modules\mocha-webpack\lib\runner\TestRunner.js:163:51)
    at eval (eval at processIncludes (C:\Projects\clicker-api\node_modules\nodent-runtime\runtime.js:36:12), <anonymous>:3:4642)

If you track it down it's a WebpackOptionsValidationError

function createCompiler(webpackConfig) {
  console.log(webpackConfig);
  try{

  var compiler = (0, _webpack2.default)(webpackConfig);
  }
  catch(err){
    console.log(err);
  }

  return compiler;
}
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.\n - configuration has an unknown property \'1\'.

Ofc, as a workaround you can run each config separately.

--webpack-config foo.config.js
@zinserjan
Copy link
Owner

Multi config isn't supported and planned. But there is a open task for this to give a good error (see open tasks in #70)

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

Successfully merging a pull request may close this issue.

2 participants