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

Add -loader suffix in webpack, closes #2410 #2447

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Add -loader suffix in webpack, closes #2410 #2447

merged 1 commit into from
Jan 14, 2017

Conversation

QWp6t
Copy link
Contributor

@QWp6t QWp6t commented Jan 14, 2017

Bundled builds were not being built correctly..

Example: https://github.com/yarnpkg/yarn/releases/download/v0.19.0/yarn-0.19.0.js
Issue: #2410

tl;dr

Just add -loader suffix to loaders in to scripts/build-webpack.js. ezpz

Details

Previously, packages named with -loader suffix could be specified as loaders within Webpack without requiring the suffix to be named explicitly. Webpack 2.1.0-beta.26 no longer looks for -loader suffix automatically, and packages have to therefore be named explicitly or -loader can be added to resolveLoader.moduleExtensions.

See: https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.26

This PR explicitly adds -loader suffix, and now bundles are correctly built.

Before

~/yarn-0.19.0  (yarn@0.19.0)
λ node scripts/build-webpack.js
[]

~/yarn-0.19.0  (yarn@0.19.0)
λ

After

~/yarn-0.19.0  (yarn@0.19.0)
λ node scripts/build-webpack.js
[ 'node_modules/ansi-escapes/index.js',
  'node_modules/ansi-regex/index.js',
  'node_modules/ansi-styles/index.js',
  'node_modules/array-find-index/index.js',
  'node_modules/asn1/lib/ber/errors.js',
  # ... etc ...
  'src/util/promise.js',
  'src/util/request-manager.js',
  'src/util/stream.js',
  'src/util/version.js' ]

~/yarn-0.19.0  (yarn@0.19.0)
λ

Previously, packages named with `-loader` suffix could be specified as loaders within Webpack without requiring the suffix to be named explicitly. Webpack 2.1.0-beta.26 no longer looks for `-loader` suffix automatically, and packages have to therefore be named explicitly or `-loader` can be added to `resolveLoader.moduleExtensions`.
See: https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.26
@bestander bestander merged commit 500bd03 into yarnpkg:master Jan 14, 2017
bestander pushed a commit that referenced this pull request Jan 14, 2017
Previously, packages named with `-loader` suffix could be specified as loaders within Webpack without requiring the suffix to be named explicitly. Webpack 2.1.0-beta.26 no longer looks for `-loader` suffix automatically, and packages have to therefore be named explicitly or `-loader` can be added to `resolveLoader.moduleExtensions`.
See: https://github.com/webpack/webpack/releases/tag/v2.1.0-beta.26
@bestander
Copy link
Member

Thanks, cherry-picking to 0.19.
0.19.1 will be released next week

@QWp6t QWp6t deleted the patch-1 branch January 15, 2017 06:30
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

Successfully merging this pull request may close these issues.

2 participants