-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Configure default loader for files + browser:false should not run onLoad plugins #2970
Comments
You can completely customize loading behavior with plugins: https://esbuild.github.io/plugins/#on-load |
If path was resolved using one of the resolveExtensions (for example So, I need to resolve it again in the onLoad callback, because there is no other way to do that, right? |
Ah that's no good. Looks like this is happening because that package contains this in its package.json file: "browser": {
"./util.inspect.js": false
}, Running |
It's not good and also not fast at all to guess extension again in the callback. According to the initial specification in this case we shouldn’t load |
For example I'm building a frontend application. I want to load all assets with file loader.
At this moment I need to explicitly specify a loader for all used extensions, to do this I need to additionally traverse all files. As we can't use regular expressions for extensions, it would be nice to have something like this.
Here is an example of a webpack configuration from react-scripts package.
The text was updated successfully, but these errors were encountered: