-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
css-loader doesn't export Webpack's stats when @import is used #755
Comments
@tanin47 It is expected because any css import become js module. Better create this issue inside webpack. |
This explains why Webpack's stats contains the content of the css import, for example:
Notice However, the css file path is nowhere to be found. Could you point to the code where it converts css import to a js module? It might be helpful to me. I want to try to solve this problem by leaving a trail that contains the css file path. Also, I'll file an issue in Webpack's project. Thank you @evilebottnawi |
@tanin47 Sorry for delay, a lot of work 😞 Problem still exists? |
Yes. I wonder if you can guide me on how to solve this problem. For more context, I'd like to detect CSS dependency. It is essential for hot-reloading code in Playframework. See: GIVESocialMovement/sbt-vuefy#20 |
@tanin47 Each |
I expect a full path of the CSS file because Playframework would be able to track dependencies and re-compile the files needed. Currently, as I posted in the earlier comment, the file path is not outputted but the content of the CSS file is. |
@tanin47 it is expected because it is module, you need custom loader for this. It is not regular use case. You can use |
Thank you for the pointers. I'll let you know if I have more questions. |
Feel free to feedback |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
The Webpack's stats doesn't seem to contain any data related to
@import
What is the expected behavior?
When reading a file from
@import
, ensure that the imported file path and the path of the file contains@import
are written to Webpack's stats (https://webpack.js.org/api/stats/).I'm still new to Webpack, so I might not understand some stuffs correctly. But I'm quite certain that the css file path isn't in Webpack's stats.
If this is a feature request, what is motivation or use case for changing the behavior?
We would like css-loader to output the file it reads to Webpack's stats. We use this data to track changes in files and their dependencies, so that we can hot-reload code correctly.
The text was updated successfully, but these errors were encountered: