Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

includePaths option prepends sass folder path to file locations #425

Closed
asolopovas opened this issue Mar 30, 2017 · 16 comments
Closed

includePaths option prepends sass folder path to file locations #425

asolopovas opened this issue Mar 30, 2017 · 16 comments

Comments

@asolopovas
Copy link

asolopovas commented Mar 30, 2017

Hi,

Recently I started to get strange effect, the sourceMap refferal to files from included paths prepends path of sass directory. So in my source-maps refers to files like C:/vhosts/project/resources/assets/sass/C:\vhosts\project/vendor\zurb\foundation\scss\grid\_gutter.scss
instead of 'C:\vhosts\3oakdb/vendor\zurb\foundation\scss\grid_gutter.scss',

here is the link to my webpack.config

@asolopovas
Copy link
Author

asolopovas commented Apr 6, 2017

I have updated my sass-loader-test repo https://github.com/asolopovas/sass-loader-test, to reflect the problem if you start index.html in public folder and inspect p.animate tag in inspect section the path will be shown as D:/path/sass-loader-test/resources/assets/sass/D:\path\sass-loader-test/resources\assets\sass\app.scss

@asolopovas
Copy link
Author

Tested it on windows ubuntu bash and sourcemaps path was fine.

@asolopovas
Copy link
Author

Same happens if you do run npm run test-source-map on the package itself so clearly is something wrong about it.

@asolopovas
Copy link
Author

Please respond someone its been a month since I created an issue. I have spent some time playing around and found that if I changeline 74 of loader.js, to result.map.sourceRoot = ''; problem goes away

@asolopovas
Copy link
Author

@jhnns it may be related to #366

@alexander-akait
Copy link
Member

@asolopovas wip

@alexander-akait
Copy link
Member

@asolopovas hm, works fine for me, can your explain more information? Whatbrowser your are use?If your can create screenshots this bug?

@asolopovas
Copy link
Author

@evilebottnawi Hi thanks for responding, here is the screenshots, I have tested it on different machines and few various projects everywhere I get the same problem, I eventually gave up and used gulp sass to generate my stylesheets along with browser-sync to inject them on fly it actually does it a bit faster. If you look at the repository provided above and generate it by simply running npm install + composer install + webpack, it will generate js script with source code in it and then if you open index.html you will see the error that I provided screenshots for.
screenshot 1
screenshot 2

@alexander-akait
Copy link
Member

@asolopovas oh really, tomorrow try to found solution 👍

@alexander-akait
Copy link
Member

i hate windows, i spend about 4 hours just to build start to work 😭

@asolopovas
Copy link
Author

@evilebottnawi I love windows, I hate their filesystem, they should have adopted it long time ago and nobody would be using mac right now. But if you fiddle a bit you can figure thing oit

@alexander-akait
Copy link
Member

@asolopovas i don't use mac 😄

@alexander-akait
Copy link
Member

Confirmed, start to searching solution

@alexander-akait
Copy link
Member

Seems related to mozilla/source-map#91

@michael-ciniawsky
Copy link
Member

@alexander-akait
Copy link
Member

Not related to style-loader, feel free to reopen if after merge webpack-contrib/css-loader#532 error still exists

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

No branches or pull requests

3 participants