Closed csfankun closed 2 years ago
The build failure is not related to vite-plugin-imp
you can try to comment out vite-plugin-imp and run npm run build
export default defineConfig({
plugins: [
react(),
// vitePluginImp({
// libList: [
// {
// libName: '@alifd/next',
// style: (name: string) => {
// return `@alifd/next/es/${name}/index.css`;
// },
// },
// ],
// }),
],
});
it will get the some error.
I guess this is a related with @alifd/next
if you want to avoid this error, you can try to modify the build
script in package.json to:
"build": "vite build"
just remove tsc
and it will build successfully.
The better way is to modify skipLibCheck
to true
in tsconfig.json.
https://stackblitz.com/edit/vitejs-vite-9joyzd?file=tsconfig.json
Describe the bug
Libarary Info(please complete the following information): Libarary: [@alifd/next]
To Reproduce Steps to reproduce the behavior:
1、pls. take a look at this online demo https://stackblitz.com/edit/vitejs-vite-ajpyen?file=src%2FApp.tsx 2、open a new terminal to run "npm run build",then you will see the mistake info
Expected behavior when run "npm run build",there is no mistake and can packaged ok
Error message Paste the error message here.
Additional context Add any other context about the problem here.