Skip to content

do not limit to js or ts files #3

@shlomiassaf

Description

@shlomiassaf

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... :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions