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

Unable to use via ESM CDN like JSDelivr or JSPM #153

Open
abhishiv opened this issue Jul 13, 2023 · 0 comments
Open

Unable to use via ESM CDN like JSDelivr or JSPM #153

abhishiv opened this issue Jul 13, 2023 · 0 comments

Comments

@abhishiv
Copy link

On JSDelivr it fails due to hard dependency on fs

await import("https://cdn.jsdelivr.net/npm/postcss-modules/+esm")
+esm:7 Uncaught Error: Failed to bundle using Rollup v2.79.1: the file imports a not supported node.js built-in module "fs". If you believe this to be an issue with jsDelivr, and not with the package itself, please open an issue at https://github.com/jsdelivr/jsdelivr

On JSPM which doesn't mind dependency to fs and can load postcss and sass due to it it fails due to an error in loader-utils subdepenendency.

await import('https://jspm.dev/postcss-modules');

npm:generic-names@4!cjs:1     GET https://jspm.dev/npm:loader-utils@3/lib/interpolateName!cjs net::ERR_ABORTED 404
Uncaught TypeError: Failed to fetch dynamically imported module: https://jspm.dev/postcss-modules

It would be really great to have it working at least on JSPM so that there's a way to bundle css modules in the browser using ESM/ImportMaps.

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

1 participant