-
Notifications
You must be signed in to change notification settings - Fork 93
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
ES module support #387
Comments
Through a chain of dependencies, we are blocked on cosmiconfig/cosmiconfig#224; contributing there would be the first step to offering ESM support. Otherwise, you'll be forced to use the |
We're now dependent on https://github.com/antonk52/lilconfig; which is better maintained and should be better able to support this; just need someone to open an issue/PR there. |
I'm also having the same issue |
Probably related:
Downgrading to 8.3.1 helped. |
@movy unrelated, v9+ requires Node 12 or higher. |
I'm on node 16.
|
isn't this solved by postcss/postcss-load-config#234 already? Just need to upgrade |
@perrin4869 It should be; just haven't gotten around to upgrading. PR welcome if someone wants to take a stab at it before I get time. @movy Whatever issue you're having, it's not related, please open a new issue. |
Released in v10.0.0! Sorry for the wait, folks. |
With the latest
My package.json:
My postcss.config.js:
My Node and NPM versions:
AFAIK this is all correct and should work. |
You either need to have |
It´s actually both. |
Hello, our team is migratiing from sapper to sveltekit and I'm struggling a bit with a script with postcss-cli which we use to generate a json file with custom variables to be used in js.
I'm getting the folowing error:
require() of ES modules is not supported. require() of /Xxxx/xxxxxxxxx/xxxxxx/kit/src/assets/styles/postcss.config.js from /Xxxx/xxxxxxxxx/xxxxxx/kit/node_modules/lilconfig/dist/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename postcss.config.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/mantismamita/radiofrancewww/kit/package.json.
The problem is that we don't want to use cjs in the project. Is there a possiblity of using a package that uses ES modules thus avoiding the need to use cjs in our postcss.config?
The text was updated successfully, but these errors were encountered: