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

Provide source maps support #1

Closed
alexeyuzlov opened this issue Feb 25, 2016 · 9 comments
Closed

Provide source maps support #1

alexeyuzlov opened this issue Feb 25, 2016 · 9 comments

Comments

@alexeyuzlov
Copy link

There is no source map after using extract. For example in this chain:
style/url!file!extract!css

@jhnns
Copy link
Member

jhnns commented May 3, 2016

That's true. Source maps are currently not supported. I'm working on that.

@RobertoUa
Copy link

How long do you think it's gonna take?

@jhnns
Copy link
Member

jhnns commented Nov 17, 2016

I'm sorry, too much work currently. If anyone is interested, please go ahead :). The code is fairly simple and I can give you support.

@ukch
Copy link

ukch commented Dec 7, 2016

@jhnns I can work on it if you show me where to start. (I'm pretty new to Webpack development though)

@wujekbogdan
Copy link

@sentika

This is my scss compilation/extraction section of my webpack config file:

{
    test: /\.scss$/,
    use: [
        {
            loader: 'file-loader',
            options: {
                name: '[name].css',
                context: './src/css/',
                outputPath: 'css/',
                publicPath: '../'
            }
        },
        {
            loader: 'extract-loader'
        },
        {
            loader: 'css-loader',
            options: {
                sourceMap: true
            }
        },
        {
            loader: 'resolve-url-loader'
        },
        {
            loader: 'postcss-loader'
        },
        {
            loader: 'sass-loader',
            options: {
                sourceMap: true
            }
        }
    ]
}

And I can see sourcemaps, but instead of separate .map files (as they should be because of devtool: '#source-map' in the configuration file) they are merged into *.css files at the end of *.css files. There's an another side-effect: paths in sourcemaps are absolute (c:/your/project/directory/file-name-css)

It's a workaround, not a solution, but at least works.

@jerome-barbato
Copy link

Is there any ETA ?

@jstrimpel
Copy link

@jhnns, @benurb I would like to contribute this enhancement if someone can direct me to documentation and/or provide a brief description of what it means for the loader to support sourcemaps in Webpack. Thanks.

jhnns added a commit that referenced this issue Aug 31, 2018
jhnns added a commit that referenced this issue Aug 31, 2018
jhnns added a commit that referenced this issue Aug 31, 2018
jhnns added a commit that referenced this issue Aug 31, 2018
@jhnns jhnns closed this as completed in #43 Aug 31, 2018
jhnns added a commit that referenced this issue Aug 31, 2018
@jhnns
Copy link
Member

jhnns commented Aug 31, 2018

@jstrimpel I tried to explain it to you how to fix it. On the way explaining it, I found the solution for the problem 😁

Shipped with v3.0.0 🚀

@jstrimpel
Copy link

@jhnns Thank you so much!

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

8 participants