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

CommonsChunkPlugin #84

Closed
jjhuff opened this issue Dec 15, 2016 · 6 comments
Closed

CommonsChunkPlugin #84

jjhuff opened this issue Dec 15, 2016 · 6 comments

Comments

@jjhuff
Copy link

jjhuff commented Dec 15, 2016

Super handy, project, thanks!!

I noticed that when I include CommonsChunkPlugin in my webpack plugins, mocha-webpack doesn't find any tests.

Not a huge issue for me, but it'd be nice if it worked since I'd be able to keep my configs a little cleaner.

@zinserjan
Copy link
Owner

Can you give me an example? Didn't tried this yet, but I'll look into it.

@jjhuff
Copy link
Author

jjhuff commented Dec 15, 2016

I'll need some more time to setup a working mini-example, but here's an excerpt from my webpack config.

plugins: [
    new webpack.optimize.CommonsChunkPlugin('lib'),
    new webpack.optimize.CommonsChunkPlugin({
      minChunks: 2,
      children: true,
    }),
    // This chunk contains only a small loader and the chunk manifest.
    // It'll be inlined into index.html
    new webpack.optimize.CommonsChunkPlugin({
      name: 'inline',
      filename: '../../src/motion.social/frontend/build/inline.js',
      minChunks: Infinity,
    }),
]

With this, mocha doesn't find any tests ("0 passing").

If I set

plugins: []

mocha finds and runs my tests.

Let me know if you want me to setup a full example.

@zinserjan
Copy link
Owner

Let me know if you want me to setup a full example.

That would be so awesome when you can find the time to do this. Thank you for your effort :)

@zinserjan
Copy link
Owner

CommonsChunkPlugin is incompatible with target: 'node' (webpack/webpack#1518).

The only thing we can do is to warn the user when the CommonsChunkPlugin is used. I added that issue to the to-do list in #70.

@jjhuff
Copy link
Author

jjhuff commented Dec 17, 2016

Ahh! That'd do it. Thanks!

@jjhuff jjhuff closed this as completed Jan 5, 2017
@mattkahl
Copy link

mattkahl commented Apr 10, 2018

For posterity's sake, this was closed but as far as I can tell the to-do referenced in #70 was never completed.

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

No branches or pull requests

3 participants