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

Parcel plugin should process existing sourcemaps #208

Closed
binyamin opened this issue Jul 3, 2022 · 5 comments
Closed

Parcel plugin should process existing sourcemaps #208

binyamin opened this issue Jul 3, 2022 · 5 comments
Milestone

Comments

@binyamin
Copy link
Contributor

binyamin commented Jul 3, 2022

The parcel module Lume uses doesn't support passing a source-map. However, it is possible to merge them, and it doesn't look too difficult. See parcel-bundler/lightningcss#219 (comment).

@oscarotero
Copy link
Member

Ok, I'll take a look.
Thanks!

@binyamin
Copy link
Contributor Author

binyamin commented Jul 4, 2022

@oscarotero Update: at the moment, the @parcel/source-map module doesn't work with Deno (See parcel-bundler/source-map#110).

@oscarotero
Copy link
Member

Very interesting info, thanks!

I guess we have to wait until this PR is merged: parcel-bundler/source-map#111
Another option is use temporary your fork

@binyamin
Copy link
Contributor Author

binyamin commented Jul 6, 2022

Another option is use temporary your fork

I put the code on GitLab, so I can use it in my projects for now. Let me know if you have questions.
https://gitlab.com/binyamin/lume-parcel-css

@oscarotero
Copy link
Member

ParcelCSS just released a new version with support for incoming source maps.
Using the development version of lume (lume upgrade --dev), this configuration should work:

import lume from "lume/mod.ts";
import postcss from "lume/plugins/postcss.ts";
import parcel_css from "lume/plugins/parcel_css.ts";

const site = lume();

site.use(postcss({
  sourceMap: true
}));
site.use(parcel_css({
  sourceMap: true
}));

export default site;

@oscarotero oscarotero added this to the 1.10.1 milestone Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants