π Export error with sveltekit
ryoppippi opened this issue Β· comments
Description
When I build a project, I got the error like this
import { render } from '@master/css/render';
^^^^^^^^^^
SyntaxError: Named export 'render' not found. The requested module '@master/css/render' is a CommonJS module, which ma
y not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@master/css/render';
const { render } = pkg;
import { StyleSheet } from "@master/css";
^^^^^^^^^
SyntaxError: Named export 'StyleSheet' not found. The requested module '@master/css' is a CommonJS module, which may
not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@master/css';
const { StyleSheet } = pkg;
I think this related to ESM building?
Reproduction
- Go to Svelte Lab project https://www.sveltelab.dev/bocwo4ayxdt0c69
- Ctrl-C at the terminal
npm run build
I also got this error in my local machine
System Informations
No response
@ryoppippi It's recommended to check out the v2 documentation at https://beta.css.master.co/docs/installation/svelte