-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Bug] Question: Trigger webpack rebuild #86
Comments
@AustinGil maybe you will find this approach helpful: sveltejs/svelte-loader#151 |
maybe relate, turn off cache might work |
@AustinGil in the same boat. Did you find a solution for this? |
Specifically disabling the cache for the loader of the virtual module fixed my issue, this was only a problem for webpack 5 though
Feel free to look through https://github.com/windicss/windicss-webpack-plugin if you want to see it In action |
Hi there, I have a (hacky) way :) ..
Using my plugin, layer-pack with big project (and too much deps) webpack do an endless loop when using fileDependencies & contextDependencies to specify fs watchs So i found another hacky way to watch things; if the "file/contextDependencies" method doesn't work for you either :
For more infos, you can see my code at https://github.com/layer-pack/layer-pack/blob/64db4bedd6d3245f69bffb6c3bcc0a9cefac8252/src/layerPackPlugin.js#L786 Hope it help :) |
My project generate routes based file system, and write react routes object into virtual module. I meet same issue, create new file didn't trigger rebuild, even write module on file compiler.hooks.compilation.tap(VMRoutesWebpackPluginName, async compiliation => {
compiliation.contextDependencies.add(path.resolve(process.cwd(), 'src/pages'));
}); above code solve my problem, hope it help |
Closing the issue as stale, please retest on latest |
This is just a question:
Is there a way to trigger Webpack to trigger a recompile on file changes? I've got a JavaScript module that builds out CSS. That's what I'm loading as a virtual module.
I've got mine building fine, but when I make changes to my file they are not showing up in my dev work. I have to restart webpack.
I've even tried using the webpack-watch-files-plugin to watch for changes and it looks like that is running fine, but my CSS changes do not get incorporated.
Additional context
The CSS module is being loaded the same way as in this thread: #70
The text was updated successfully, but these errors were encountered: