Open RexHung0302 opened 3 years ago
how to fix it when using vite (or rollup)?
how to fix it when using vite (or rollup)?
Hi, u can set it on vite.config.js.
how to fix it when using vite (or rollup)?
Hi, u can set it on vite.config.js.
How to configure on vite? Can you provide a demo
how to fix it when using vite (or rollup)?
Hi, u can set it on vite.config.js. https://vitejs.dev/config/#configuring-vite
How to configure on vite? Can you provide a demo
sure, you can try this
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
build: {
rollupOptions: {
external: ['./cptable'],
output: {
globals: {
'./cptable': 'cptable',
},
},
},
},
})
I got those code from GPT, you can try it and let me know how it work, thx.
First, thank the author create this plugins.
I use xlsx-style and got an error like others, but a find a way to resolve(only when you use frontend framework) the error without do edit
/node_modules/xlsx-style/dist/cptable.js
, the resolve way is by webpack.config.js.vue.config.js
and write these:config-overrides.js
on your project './', file content write these:I'm do the demo in my repositories, you can pull and try.
I'm not try angular, sorry.