Skip to content

feat(sourcemaps): add support for pass through of sourcemaps #12

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

Closed
wants to merge 3 commits into from

Conversation

admosity
Copy link

@admosity admosity commented Feb 22, 2017

Adds simple extraction of sourcemaps with https://github.com/webpack-contrib/css-loader delivers #11

Sample config:

{
          test: /\.css$/,
          use: ['to-string-loader?sourceMap', `css-loader?${JSON.stringify({ sourceMap: true, importLoaders: 1 })}`],
        }

Dev console with angular 2 build:
image

@gajus
Copy link
Owner

gajus commented Feb 22, 2017

Thank you – is this ready to merge?

@admosity
Copy link
Author

Yep it's good to go 👍

@admosity
Copy link
Author

Actually.. I retract that statement. I have to rewrite the outputted string in es5.

@admosity
Copy link
Author

Okay now it's good.

@OzzieOrca
Copy link

I'm not sure this is necessary. The css-loader toString function seems to handle this fine now. I'm using Angular and discovered I could use exports-loader?module.exports.toString(). See #1 (comment).

Angular does currently have an issue where it is stripping sourcemaps from component styles.
I got it working locally by patching my local Angular compiler with angular/angular#16090. It hasn't been merged yet. angular/angular#16088 is related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants