-
I tried to publish an UI package that use pandacss. When using this package with a nextjs app that already got config with panda, it raised an error below
Here is the import { defineConfig } from '@pandacss/dev';
export default defineConfig({
include: ['./src/**/*.{ts,tsx}'],
emitPackage: true,
outdir: '@asherng/styled',
jsxFramework: 'react',
}); And here is the export default defineConfig({
globalCss,
preflight: true,
include: [
'./src/components/**/*.{ts,tsx,js,jsx}',
'./src/app/**/*.{ts,tsx,js,jsx}',
'./node_modules/@asherng/css-ui/lib/styled.buildinfo.json'
],
emitPackage: true,
outdir: '@asherng/styled',
jsxFramework: 'react',
hash: true,
}); The import { styled } from '@asherng/styled/jsx';
import buttonStyle from './variants';
const Button = styled('div', buttonStyle);
export default Button; Testing repo here: https://github.com/kidjp85/nextjs-panda-test I tried to enable |
Beta Was this translation helpful? Give feedback.
Answered by
astahmer
Jul 6, 2023
Replies: 1 comment 1 reply
-
I'm not sure if we should have this built-in (@segunadebayo) but:
{
"name": "@asherng/styled",
"description": "This package is auto-generated by CSS Panda",
"version": "0.0.0-744.0574159622192",
"type": "module",
"exports": {
"./css": {
"types": "./css/index.d.ts",
+ "require": "./css/index.mjs",
"import": "./css/index.mjs"
},
"./jsx": {
"types": "./jsx/index.d.ts",
+ "require": "./jsx/index.mjs",
"import": "./jsx/index.mjs"
},
"./patterns": {
"types": "./patterns/index.d.ts",
+ "require": "./patterns/index.mjs",
"import": "./patterns/index.mjs"
},
"./recipes": {
"types": "./recipes/index.d.ts",
+ "require": "./recipes/index.mjs",
"import": "./recipes/index.mjs"
},
"./tokens": {
"types": "./tokens/index.d.ts",
+ "require": "./tokens/index.mjs",
"import": "./tokens/index.mjs"
},
"./types": {
"types": "./types/index.d.ts"
},
"./styles.css": "./styles.css"
}
}
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kidjp85
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure if we should have this built-in (@segunadebayo) but:
require
condition on allexports
of thenode_modules/@asherng/styled/package.json