Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Config setup with multi-compiler Webpack CLI? #56

Open
coreyleelarson opened this issue Jun 26, 2017 · 2 comments
Open

Config setup with multi-compiler Webpack CLI? #56

coreyleelarson opened this issue Jun 26, 2017 · 2 comments

Comments

@coreyleelarson
Copy link
Contributor

How should the plugin be applied in a multi-compiler setup when used with the webpack CLI? #9 does not give a clear indication on how the configs should look, and there has been no response in the closed issues on this (#16 and #8).

I even looked at the tests to try and figure it out, but they appear to use the Node API only, not the Webpack CLI.

Below is a skeleton example of what I'm working with. If I apply the friendly errors plugin to both configs I get two compilations showing different compilation times. It is especially frustrating with clearConsole: true because if the first finisher has an error and second finisher is successful, the terminal is cleared and only shows the success message.

If someone could provide some insight into this, it'd be greatly appreciated. This plugins looks like it would help out my development workflow tremendously, but it doesn't seem to work as expected with this setup.

webpack.config1.babel.js

import FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin';

export default {
  entry: {
    ...
  },
  output: {
    ...
  },
  plugins: [
    new FriendlyErrorsPlugin()
  ]
}

webpack.config2.babel.js

import FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin';

export default {
  entry: {
    ...
  },
  output: {
    ...
  },
  plugins: [
    new FriendlyErrorsPlugin()
  ]
}

webpack.config.babel.js

import configOne from './webpack.config1.babel';
import configTwo from './webpack.config2.babel';

export default [configOne, configTwo];
@dcalsky
Copy link

dcalsky commented Sep 12, 2017

+1

1 similar comment
@matteobad
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants