Replies: 1 comment
-
Can you try to add - <script>
+ <script lang="jsx"> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
不使用render函数就正常
import { pluginVue2 } from '@rsbuild/plugin-vue2' import { defineConfig, loadEnv } from '@rsbuild/core' import { pluginBabel } from '@rsbuild/plugin-babel' import { pluginVue2Jsx } from '@rsbuild/plugin-vue2-jsx' const { publicVars } = loadEnv({ prefixes: ['VUE_APP_'] }) const path = require('path') const isProd = process.env.NODE_ENV === 'production' const assetsCDN = { externals: { // vue: 'Vue', // 'vue-router': 'VueRouter', // vuex: 'Vuex', // axios: 'axios' }, css: [], // https://unpkg.com/browse/vue@2.6.10/ js: [ '//cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.min.js', '//cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js', '//cdn.jsdelivr.net/npm/vuex@3.1.1/dist/vuex.min.js', '//cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js', ], } function resolve(dir) { return path.join(__dirname, dir) } export default defineConfig({ plugins: [ pluginVue2(), pluginBabel({ include: /\.(?:jsx|tsx)$/, exclude: /[\\/]node_modules[\\/]/, }), pluginVue2Jsx(), ], source: { // 指定入口文件 entry: { index: './src/main.ts', }, define: publicVars, }, html: { template: './public/index.html', }, tools: { cssLoader: {}, less: { // additionalData:
@import "${resolve(__dirname, 'src')}/style/var.less";`,implementation: require('less'),
lessOptions: {
modifyVars: {
// less vars,customize ant design theme
},
server: {
port: 8000,
proxy: {
'/api': {
target: 'https://',
ws: true,
changeOrigin: true,
logLevel: 'debug',
pathRewrite: {
'^/api': '',
},
},
},
},
})
`
Beta Was this translation helpful? Give feedback.
All reactions