Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Conversation

@malissa
Copy link
Contributor

@malissa malissa commented Oct 2, 2017

Great project! I needed to upgrade webpack to v2 in order to get some imports working. I have not included package.json in this because I added a bunch of other stuff but the webpack entry is "webpack": "2".

Caveat, I don't know everything the previous config was trying to do but I left it as is and followed migration steps.

P.S. There is a deprecation warning that I have not addressed:

node:59682) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

@raquo
Copy link
Owner

raquo commented Oct 2, 2017

Hey @malissa, thanks for the PR!

The migration looks good, just one missing thing: the package.json file still refers to old version of webpack. You can edit it manually, or run this command:

npm install --save --save-exact webpack@2.7.0 

Regarding the deprecation warning, it mentions loader-utils. It's an npm package, but it's not listed in package.json. So, it must be a transient dependency, i.e. it's a dependency of one or more of our own dependencies, but of which one? To answer that question, run

npm ls loader-utils 

It will show:

├─┬ babel-loader@6.4.1 │ └── loader-utils@0.2.17 ├─┬ css-loader@0.28.0 │ └── loader-utils@1.1.0 ├─┬ eslint-loader@1.7.1 │ └── loader-utils@1.1.0 └─┬ style-loader@0.16.1 └── loader-utils@1.1.0 

Since it's a deprecation warning, I just guessed that it's coming from that old 0.2.17 version used by babel-loader. So let's just get a newer version of babel-loader, hoping that it will also depend on a newer version of loader-utils:

npm i --save --save-exact babel-loader@latest 

And yes, this does fix the deprecation warning.

Although interestingly, if you run npm ls loader-utils again, you'll see this:

├─┬ babel-loader@7.1.2 │ └── loader-utils@1.1.0 ├─┬ css-loader@0.28.0 │ └── loader-utils@1.1.0 ├─┬ eslint-loader@1.7.1 │ └── loader-utils@1.1.0 ├─┬ style-loader@0.16.1 │ └── loader-utils@1.1.0 └─┬ webpack@2.7.0 └── loader-utils@0.2.17 

For some reason, it now reports that webpack@2.7.0 is using the old version of loader-utils. I'm sure someone with a PhD in npm can explain this, but not me. Doesn't seem to be causing any problems, so let's leave it like that.

So that's it, please update the package.json in your PR, and I will gladly merge it.

@raquo raquo assigned raquo and unassigned raquo Oct 2, 2017
@raquo raquo merged commit 53d3c8f into raquo:master Nov 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants