Skip to content

Wrong paths for css source maps #635

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
webpack-bot opened this issue Nov 22, 2017 · 1 comment
Closed

Wrong paths for css source maps #635

webpack-bot opened this issue Nov 22, 2017 · 1 comment

Comments

@webpack-bot
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Source maps for scss files produced by webpack contains duplicate parts like C:\...C:\...\some-file.scss.
I'd like to use relative paths but I can't understand why webpack use absolute paths for css files.

If the current behavior is a bug, please provide the steps to reproduce.
There is my loaders configuration for scss files:

loader: [
    "style-loader",
    {
        loader: "css-loader",
        options: {
            sourceMap: true,
            minimize: true,
            importLoaders: 2
        }
    },
    {
        loader: "postcss-loader",
        options: {
            sourceMap: true,
            plugins: function () {
                return [
                    require("autoprefixer")({
                        browsers: ["last 4 versions"]
                    })
                ];
            }
        }
    },
    {
        loader: "sass-loader",
        options: {
            sourceMap: true
        }
    },
    "sass-bulk-import-loader"
]

What is the expected behavior?
The source map file have to containe one absolute or relative path to the source file.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
webpack 2.2,1 but I also tested with 2.6.1 and the problem is the same
node.js 7.7.4
"style-loader": "^0.13.1"
"css-loader": "^0.28.4",
"postcss-loader": "^2.0.5",
"autoprefixer": "^7.1.1",
"node-sass": "^4.5.2",
"sass-loader": "^6.0.5"
Windows 7


This issue was moved from webpack/webpack#5016 by @evilebottnawi. Orginal issue was by @katzz0.

@alexander-akait
Copy link
Member

Closing in favor #652

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

No branches or pull requests

2 participants