Replies: 1 comment 1 reply
-
I have a simular issue with shaders for webgl game in Pixi.js (.vert, .frag, .glsl). When I import the shader file and log it, it returns an URL to that shader as string instead of the text content as string. I have Webpack version 5.99.9 & Node version 24.3.0. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue with
type: 'asset/source'
in Webpack v5.96.0 Causing CSS Files Not to Be PackagedMy project is an Angular project with a custom-written Webpack configuration.
Problem Description
When using Webpack version 5.95.0, I used the following configuration to handle CSS files, and the CSS files were correctly packaged during the build process, with styles displaying properly on the page. However, after upgrading Webpack to v5.96.0, the CSS files are no longer packaged during the build process, causing the page styles to fail.
mjs Configuration Code:
header Component:
header.css:
Debugging Findings
After debugging, I found that the
[webpack\lib\asset\AssetSourceGenerator.js]
file in Webpack v5.96.0 has been modified. In v5.95.0, it directly returns[return TYPES]
. The new logic in v5.96.0 causesoriginModule
to benull
, which prevents the CSS files from being correctly processed.If I comment out
type: 'asset/source'
and replace it withuse: ['raw-loader']
, the CSS files are correctly packaged and the styles display properly:Alternative Configuration:
Environment Information
Question
What additional configuration is needed when using
type: 'asset/source'
to ensure that CSS files are correctly packaged?Beta Was this translation helpful? Give feedback.
All reactions