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
unable to generate sourcemap with asset/resource #962
Comments
@alexander-akait What's needed to get the existing PR done? |
Need finish #968 and rebase |
Not sure if @cap-Bernardito is still actively working on it. Anything I can help with? I guess I would have to supersede the PR in this case. |
Yes, feel free to resend PR 👍 |
Still having this issue using asset/resource - take it this was never resolved? |
@jivemedia Feel free to send a PR, you can use it #1010, I think we should to avoid using |
Copied from webpack discussion: webpack/webpack#13505
My setup is successfully compiling sass/scss and outputting a
.css
file which I'm referencing in js, however unfortunately I can't get a.css.map
(source map for the scss) file to be generated too.What I'd really like is the equivalent of
which generates
main.css
andmain.css.map
.I have the following module rules in
webpack.config.js
:I I know that the
sass-loader
is generating a source map - I inserted a log statement here:sass-loader/src/index.js
Line 83 in 6ceaa0f
and the map is present and populated. However
webpack
seems to be discarding the map while I need it to be written toassets/[name].css.map
.I've tried numerous values of
devtool
but it doesn't seem to make any difference. I've also tried addingstyle-loader
andcss-loader
, but that seems to break the css generating and doesn't cause a source map to be generated.Is this a limitation of
type: 'asset/resource'
, or am I doing something wrong? Could I implement my own loader to accomplish this?Notable dependency version:
I've also tried something like:
See the above discussion for a custom loader I wrote which resolved this (at the price of lots of other problems)
The text was updated successfully, but these errors were encountered: