We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@rspack/core: 0.5.3
__webpack_require__.hmrC.css is missing after I changed the css_loading runtime module.
__webpack_require__.hmrC.css
css_loading
No response
// rsbuild.config.ts import { Rspack, defineConfig } from '@rsbuild/core'; import { pluginReact } from '@rsbuild/plugin-react'; export default defineConfig({ plugins: [pluginReact()], dev: { writeToDisk: true, // inspect output }, tools: { bundlerChain(chain) { chain.plugin('TestPlugin').use(TestPlugin); }, }, }); class TestPlugin { apply(compiler: Rspack.Compiler) { compiler.hooks.thisCompilation.tap('TestPlugin', (compilation) => { compilation.hooks.runtimeModule.tap('TestPlugin', (module) => { if (module.name !== 'css_loading' || !module.source) return; const originCode = module.source.source.toString('utf-8'); module.source.source = Buffer.from( originCode .replace(/document\.(getElementsByTagName|querySelectorAll)/g, `(globalThis.APP_ROOT||document).$1`) .replace(/document\.head/g, `(globalThis.APP_STYLE_ROOT||document.head)`), 'utf-8', ); }); }); } }
The text was updated successfully, but these errors were encountered:
LingyuCoder
Successfully merging a pull request may close this issue.
System Info
@rspack/core: 0.5.3
Details
__webpack_require__.hmrC.css
is missing after I changed thecss_loading
runtime module.Reproduce link
No response
Reproduce Steps
The text was updated successfully, but these errors were encountered: