Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

do not limit to js or ts files #3

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

Activity

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

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