-
Notifications
You must be signed in to change notification settings - Fork 186
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
Accept an input source-map, for generating the final source-map #219
Comments
Parcel already does this. I assume you mean when using the Parcel CSS CLI? |
@devongovett Nope. I'm using |
We could support data urls in a I suppose we could also support a separate input string for the source map, but handling that is already possible using Parcel's source map library. Something like this: const {transform} = require('@parcel/css');
const SourceMap = require('@parcel/source-map');
let result = transform({ /* ... */ });
let prevMap = new SourceMap(PROJECT_ROOT_DIR);
prevMap.addVLQMap(previousSourceMapJSON)
let map = new SourceMap(PROJECT_ROOT_DIR);
map.addVLQMap(JSON.parse(result.map.toString()));
map.extends(prevMap); |
@devongovett Thank you. By the way, what does the |
All file paths in the source map are stored relative to the project root directory. Typically it'll be the root of your git repository, for example. Btw, I'm working on support for data urls in |
When a stylesheet has a source-map from a previous transformation, use it to generate the new source-map.
Use-case: A user might transform
.scss
files into CSS, and then minify it with parcel-css.The text was updated successfully, but these errors were encountered: