You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this line of code the loader will skip processing if the extensions are not js or ts.
This is not something that the loader should care about.
If the user sent an invalid file, somewhere along the pipeline and error will be thrown and the loader can catch it or pass it on.
The whole purpose of webpack is to allow transformation of content between loaders so it is 100% valid to send a file.XXX that contains valid js code. Even if, originally, the file had C++ code but before value-loader a C++ to JS loader changed it... 100% valid.
A real-life example is tsx files... some might use coffescript files and frankly there are tons of extensions out there that can have valid JS code, transformed or not.
Let this be a user's choice, if the user makes the wrong choice webpack will not stay silent... :)
The text was updated successfully, but these errors were encountered:
@shlomiassaf I think it is meant to check whether or not this is executable code. In this case execute it, otherwise give me the raw content (e.g. css files).
In this line of code the loader will skip processing if the extensions are not
js
orts
.This is not something that the loader should care about.
If the user sent an invalid file, somewhere along the pipeline and error will be thrown and the loader can catch it or pass it on.
The whole purpose of webpack is to allow transformation of content between loaders so it is 100% valid to send a
file.XXX
that contains valid js code. Even if, originally, the file had C++ code but beforevalue-loader
a C++ to JS loader changed it... 100% valid.A real-life example is
tsx
files... some might use coffescript files and frankly there are tons of extensions out there that can have valid JS code, transformed or not.Let this be a user's choice, if the user makes the wrong choice webpack will not stay silent... :)
The text was updated successfully, but these errors were encountered: