You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportdefaultdefineConfig({plugins: [// Turn off vue and vuejsx plugins// vue(),// vueJsx(),// When the type of veauryVitePlugins is set to vue, // only jsx in files in the directory named 'react_app' will be parsed with react jsx,// and jsx in other files will be parsed with vue jsxveauryVitePlugins({type: 'react',// Configuration of @vitejs/plugin-vue// vueOptions: {...},// Configuration of @vitejs/plugin-reactreactOptions: {{babel: {plugins: [["@babel/plugin-proposal-decorators",{legacy: true}],["@babel/plugin-proposal-class-properties",{loose: true}],],}},// Configuration of @vitejs/plugin-vue-jsx// vueJsxOptions: {...}})]})
把react()方法注释掉,那如果react项目里原本有配置怎么处理?
比如如下的配置
plugins: [
react({
babel: {
plugins: [
["@babel/plugin-proposal-decorators", { legacy: true }],
["@babel/plugin-proposal-class-properties", { loose: true }],
],
},
}),
viteEasyMock(),
visualizer({ open: true }),
The text was updated successfully, but these errors were encountered: