Skip to content
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

Strange CSS sourcemap filename path #572

Open
danauclair opened this issue Nov 19, 2015 · 3 comments
Open

Strange CSS sourcemap filename path #572

danauclair opened this issue Nov 19, 2015 · 3 comments

Comments

@danauclair
Copy link

CSS sourcemaps have strange repeated paths. This looks like it may have something to do with webpack's output.devtoolModuleFilenameTemplate config.

Example:
webpack:///./src/containers/App/src/src/containers/App/App.scss

This makes it hard to map all of the components at once in Chrome's dev tools (for saving back to source files).

@danauclair
Copy link
Author

It seems like autoprefixer being in the loader chain may be causing this.

@quicksnap
Copy link
Collaborator

Any update on this? Are we using the correct version of css-loader re: webpack-contrib/css-loader#154

@sagiyemi
Copy link

sagiyemi commented Feb 2, 2016

@quicksnap @danauclair Applying the autoprefixer first solves this issue

Change

  { test: /\.less$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!autoprefixer?browsers=last 2 version!less?outputStyle=expanded&sourceMap=true&sourceMapContents=true') },
  { test: /\.scss$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!autoprefixer?browsers=last 2 version!sass?outputStyle=expanded&sourceMap=true&sourceMapContents=true') },

to

  { test: /\.less$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!less?outputStyle=expanded&sourceMap=true&sourceMapContents=true!autoprefixer?browsers=last 2 version') },
  { test: /\.scss$/, loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=2&sourceMap!sass?outputStyle=expanded&sourceMap=true&sourceMapContents=true!autoprefixer?browsers=last 2 version') },

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

No branches or pull requests

3 participants