Repository navigation
Remove automatic -loader module name extension - #3102
Merged
jhnns merged 6 commits intoOct 25, 2016
Merged
Conversation
Jessidhia
reviewed
Oct 6, 2016
| // use buildin json loader | ||
| console.dir(require("./test.json")); // default by extension | ||
| console.dir(require("!json!./test.json")); // manual No newline at end of file | ||
| console.dir(require("!json!./test.json")); // manual |
| @@ -4,4 +4,4 @@ module.exports = { | |||
| { test: /\.json$/, loader: "json" } | |||
There was a problem hiding this comment.
This also looks like it needs updating
jhnns
suggested changes
Oct 19, 2016
| @@ -1,12 +1,12 @@ | |||
| var webpack = require("../../"); | |||
| module.exports = { | |||
| plugins: [ | |||
Contributor
There was a problem hiding this comment.
Seems like you've converted tabs to spaces. Please revert that change here.
Contributor
|
These changes look good. Currently, there's one failing test but this test is currently also failing on master so it's not related to this change. Could you revert the whitespace change (as requested) and rebase the branch against master to make it up-to-date? |
amsdamsgram
force-pushed
the
remove-automatic-loader-extension
branch
from
October 25, 2016 08:54
db96d81 to
bc3ff40
Compare
Author
|
@jhnns Should be good now! |
Contributor
|
@iDams awesome, thanks! 👍 |
jhnns
added a commit
to webpack/webpack.js.org
that referenced
this pull request
Oct 25, 2016
Aligns with breaking change introduced with webpack/webpack#3102 See webpack/webpack#2986
Author
|
@jhnns yay! |
sokra
reviewed
Nov 1, 2016
| chunk {1} hash.worker.js (main) 168 bytes [entry] [rendered] | ||
| > main [1] ./worker.js | ||
| [1] ./worker.js 168 bytes {1} [built] | ||
| >>>>>>> fix-2986: Remove automatic -loader module name extension |
jhnns
added a commit
that referenced
this pull request
Nov 2, 2016
Accidentally introduced with #3102
niieani
added a commit
to easy-webpack/config-babel
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-css
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-eslint
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-external-source-maps
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-fonts-and-images
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-global-bluebird
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-global-jquery
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-html
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-json
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-less
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-pug
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-sass
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-test-coverage-istanbul
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-tslint
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
niieani
added a commit
to easy-webpack/config-typescript
that referenced
this pull request
Nov 8, 2016
done in preparation for webpack/webpack#3102
epixa
added a commit
to epixa/kibana
that referenced
this pull request
Dec 20, 2016
Webpack v1 checks for the exact package name as the given loader name before adding the -loader suffix, which is what we really want. Unfortunately, this can mean that webpack can accidentally pick up non-webpacker loader modules if they are at the top level of the dependency graph, which is far more likely in npm 3+. Webpack v2 will require all loaders to be explicitly named with the -loader suffix (where appropriate), so this change gets us closer to that anyway. See webpack/webpack#3102
epixa
added a commit
to elastic/kibana
that referenced
this pull request
Dec 20, 2016
Webpack v1 checks for the exact package name as the given loader name before adding the -loader suffix, which is what we really want. Unfortunately, this can mean that webpack can accidentally pick up non-webpacker loader modules if they are at the top level of the dependency graph, which is far more likely in npm 3+. Webpack v2 will require all loaders to be explicitly named with the -loader suffix (where appropriate), so this change gets us closer to that anyway. See webpack/webpack#3102
elastic-jasper
added a commit
to elastic/kibana
that referenced
this pull request
Dec 20, 2016
Backports PR #9576 **Commit 1:** build: -loader suffix for all webpack loaders Webpack v1 checks for the exact package name as the given loader name before adding the -loader suffix, which is what we really want. Unfortunately, this can mean that webpack can accidentally pick up non-webpacker loader modules if they are at the top level of the dependency graph, which is far more likely in npm 3+. Webpack v2 will require all loaders to be explicitly named with the -loader suffix (where appropriate), so this change gets us closer to that anyway. See webpack/webpack#3102 * Original sha: 19f2a34 * Authored by Court Ewing <[email protected]> on 2016-12-20T20:00:26Z
epixa
added a commit
to elastic/kibana
that referenced
this pull request
Dec 20, 2016
Webpack v1 checks for the exact package name as the given loader name before adding the -loader suffix, which is what we really want. Unfortunately, this can mean that webpack can accidentally pick up non-webpacker loader modules if they are at the top level of the dependency graph, which is far more likely in npm 3+. Webpack v2 will require all loaders to be explicitly named with the -loader suffix (where appropriate), so this change gets us closer to that anyway. See webpack/webpack#3102
epixa
pushed a commit
to elastic/kibana
that referenced
this pull request
Dec 20, 2016
Backports PR #9576 **Commit 1:** build: -loader suffix for all webpack loaders Webpack v1 checks for the exact package name as the given loader name before adding the -loader suffix, which is what we really want. Unfortunately, this can mean that webpack can accidentally pick up non-webpacker loader modules if they are at the top level of the dependency graph, which is far more likely in npm 3+. Webpack v2 will require all loaders to be explicitly named with the -loader suffix (where appropriate), so this change gets us closer to that anyway. See webpack/webpack#3102 * Original sha: 19f2a34 * Authored by Court Ewing <[email protected]> on 2016-12-20T20:00:26Z
patrykkopycinski
pushed a commit
to patrykkopycinski/kibana
that referenced
this pull request
May 6, 2026
Webpack v1 checks for the exact package name as the given loader name before adding the -loader suffix, which is what we really want. Unfortunately, this can mean that webpack can accidentally pick up non-webpacker loader modules if they are at the top level of the dependency graph, which is far more likely in npm 3+. Webpack v2 will require all loaders to be explicitly named with the -loader suffix (where appropriate), so this change gets us closer to that anyway. See webpack/webpack#3102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RESOLVING CONFLICTS
No tests have been added. As @jhnns said
Loader part on the new documentation is not written yet.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
webpack automatically appends
-loaderto a module when the first module lookup failedWhat is the new behavior?
webpack should not append
-loaderDoes this PR introduce a breaking change?
If this PR contains a breaking change, please describe the following...
-loaderwill have adjust their webpack configs-loaderat the end of module name in webpack config