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

Config setup with multi-compiler Webpack CLI? #56

Open
@coreyleelarson

Description

@coreyleelarson

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];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions