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

chai.js stopped working with webpack1 out of the box #985

Closed
AviVahl opened this Issue Jun 1, 2017 · 5 comments

Comments

Projects
None yet
5 participants
@AviVahl

AviVahl commented Jun 1, 2017

Due to commit 4d45c5d, chai.js now requires json-loader, which is not included in Webpack 1.

Webpack 2 has a built-in json loader, so it is not affected.

Workarounds: user can manually add json-loader to his webpack 1 configuration, or use webpack 2.

@oliviertassinari

This comment has been minimized.

Show comment
Hide comment
@oliviertassinari

oliviertassinari Jun 3, 2017

That's a breaking change. I had to add:

          {
            test: /\.json$/,
            loader: 'json-loader',
          },

and

-extensions: ['.js'],
+extensions: ['.js', '.json'],

oliviertassinari commented Jun 3, 2017

That's a breaking change. I had to add:

          {
            test: /\.json$/,
            loader: 'json-loader',
          },

and

-extensions: ['.js'],
+extensions: ['.js', '.json'],

bergie added a commit to noflo/noflo-ui that referenced this issue Jun 3, 2017

@vieiralucas

This comment has been minimized.

Show comment
Hide comment
@vieiralucas

vieiralucas Jun 3, 2017

Member

Hey @AviVahl, thanks for your issue
I believe that this should be fixed once #986 gets merged and published
Let me know if I'm missing something

Member

vieiralucas commented Jun 3, 2017

Hey @AviVahl, thanks for your issue
I believe that this should be fixed once #986 gets merged and published
Let me know if I'm missing something

@AviVahl

This comment has been minimized.

Show comment
Hide comment
@AviVahl

AviVahl Jun 4, 2017

Thank you for addressing this. 👍 I'll verify (and close the ticket) once 4.0.2 is out.

AviVahl commented Jun 4, 2017

Thank you for addressing this. 👍 I'll verify (and close the ticket) once 4.0.2 is out.

@jraller

This comment has been minimized.

Show comment
Hide comment
@jraller

jraller Jun 5, 2017

In chai.js the line exports.version = require('../package').version; is DRY, but it is brittle with regard to webpack and also wallabyjs.

In order to get things working with wallaby any override of webpackConfig.resolve.extensions needs to include .json. This is an extension of the modification suggested by @oliviertassinari.

jraller commented Jun 5, 2017

In chai.js the line exports.version = require('../package').version; is DRY, but it is brittle with regard to webpack and also wallabyjs.

In order to get things working with wallaby any override of webpackConfig.resolve.extensions needs to include .json. This is an extension of the modification suggested by @oliviertassinari.

@keithamus

This comment has been minimized.

Show comment
Hide comment
@keithamus

keithamus Jun 5, 2017

Member

Closed via #986. We'll get a release out soon.

Member

keithamus commented Jun 5, 2017

Closed via #986. We'll get a release out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment