Comments (7)
I think that dart-sass
does not support relative files in the sources
field as of sass/dart-sass#1021 when it's not writing the files to disk. I'm not sure why that change was made. The official sass API documentation also says:
The source map uses absolute file: URLs to link to the Sass source files, except if the source file comes from the data option in which case it lists its URL as stdin.
I haven't yet figured out if there's a way around this.
from grunt-sass.
This feels like a totally crazy hack approach that should not be necessary, but for now, I'm using grunt-string-replace to get this done:
'string-replace': {
dist: {
files: [
{
expand: true,
cwd: 'dist/css/',
src: '*.min.css.map',
dest: 'dist/css/',
},
],
options: {
replacements: [
// place files inline example
{
pattern: /(file:\/\/\/([^,]*)\/wp-content)+/g,
replacement: '/wp-content',
},
],
},
},
},
from grunt-sass.
Is this repo still maintained? I don't think it can be answered in one of the Sass-parser repo's since it's the specific implementation of grunt-sass that seems to cause this issue.
from grunt-sass.
Not sure there's much to be done here as node-sass is basically telling people to use dart-sass for continued support and you're right that it looks like they are forcing stdout to use absolute urls.
Just reemphasizing that this is sad since the default for sass --source-map-urls
is relative
in dart-sass and this issue means that each time a new developer works on any of our projects and any css compiling is triggered, they are checking in their new absolute URLs from their local machine for every single map file.
from grunt-sass.
I just migrated to dart-sass and discovered all sourcemap paths are now absolute instead of relative. Passing "source-map-urls" = "relative"
or sourceMapUrls = "relative"
under options has no effect. Anyone find a solution?
from grunt-sass.
We're also having this issue, would love to know if there has been any movement.
from grunt-sass.
What about this approach? - using sourceMapContents to make bigger but more dependable map files? Is that possible here, or still not possible because we're using the API and not command line?
cferdinandi/build-tool-boilerplate#7 (comment)
from grunt-sass.
Related Issues (20)
- Comments in rules HOT 1
- Add support for Dart Sass HOT 10
- nodejs 10 support is missing HOT 9
- Change one folder name on destination path HOT 1
- vulnerabilities found - npm audit HOT 1
- load-grunt-tasks HOT 5
- SASS error triggers UnhandledPromiseRejectionWarning HOT 3
- Since v3 grunt-contrib-watch fails to recover after grunt-sass recovers from an error HOT 7
- "Original" argument must be of type Function. Received type undefined HOT 3
- ReferenceError: sass is not defined HOT 1
- More descriptive errors for undefined variables HOT 5
- Errors display underscores as dashes in variable names HOT 1
- path problem? HOT 5
- Grunt task results in recursion when the task name is "sass" HOT 2
- README example for using dart-sass is incorrect
- Node-Sass version 4.7.2 unavailable as git binary HOT 1
- Use new node-sass Major Version 5.0 HOT 1
- Load module from grunt.loadNpmTasks HOT 2
- Task sass not found - Doc or dep lacking HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-sass.