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

resolve configs for webpack2 #569

Closed
wants to merge 3 commits into from

Conversation

toshafed
Copy link
Contributor

Added configs for webpack2 (since version 2.1.0-beta.23)
modulesDirectories now change to modules

@coveralls
Copy link

coveralls commented Sep 21, 2016

Coverage Status

Coverage remained the same at 97.846% when pulling f7f768b on kupibiletdev:resolve-config into 0f527d2 on benmosher:master.

@coveralls
Copy link

coveralls commented Sep 21, 2016

Coverage Status

Coverage remained the same at 97.846% when pulling a4f1e70 on kupibiletdev:resolve-config into 0f527d2 on benmosher:master.

@benmosher
Copy link
Member

It's not clear to me what this PR accomplishes. Changes appear to be formatting and config for tests, only.

Can you elaborate on what the intended outcome is? I'm familiar with the modules config change for Webpack 2, but it's not clear to me why the tests needed to be updated.

cc @charlieschwabacher, who is apparently pretty enthused about this 😄

@charlieschwabacher
Copy link

charlieschwabacher commented Sep 22, 2016

@benmosher - including modulesPaths in a webpack config w/ webpack 2 leads to an error:

WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.resolve has an unknown property 'modulesPaths'. These properties are valid:
   object { alias?, aliasFields?, cachePredicate?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache? }

So you end up needing to remove the resolve.modulesPaths option to get webpack to build, but doing so breaks linting if you have added any paths. Adding resolve.modules as a fallback in index.js here looks like it will fix the issue I am having.

(the relevant non-test changes are to lines 189 and 196 of resolvers/webpack/index.js)

@benmosher
Copy link
Member

@charlieschwabacher ah, got it, thanks for the detail. I looked right at those lines but just didn't see it the first time.

benmosher added a commit that referenced this pull request Oct 13, 2016
@benmosher
Copy link
Member

merged (had to move the changelog note, but kept your changes)

thanks!

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

Successfully merging this pull request may close these issues.

5 participants