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
-
不使用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/[email protected]/ js: [ '//cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js', '//cdn.jsdelivr.net/npm/[email protected]/dist/vue-router.min.js', '//cdn.jsdelivr.net/npm/[email protected]/dist/vuex.min.js', '//cdn.jsdelivr.net/npm/[email protected]/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