提交 ff46f17a 编写于 作者: fxy060608's avatar fxy060608

fix(nvue): remove wxs/renderjs

上级 ba1c059a
......@@ -14,6 +14,7 @@ import { uniAppCssPlugin } from './plugins/appCss'
import { uniEsbuildPlugin } from './plugins/esbuild'
import { uniMainJsPlugin } from './plugins/mainJs'
import { uniPagesJsonPlugin } from './plugins/pagesJson'
import { uniRenderjsPlugin } from './plugins/renderjs'
export { initNVueNodeTransforms } from './plugin'
......@@ -28,6 +29,7 @@ export function initNVuePlugins() {
uniManifestJsonPlugin(),
uniPagesJsonPlugin({ renderer, appService }),
uniViteInjectPlugin('uni:app-inject', initAppProvide()),
uniRenderjsPlugin(),
uniAppNVuePlugin({ appService }),
uniEsbuildPlugin({ renderer, appService }),
...(appService ? [uniStatsPlugin(), uniTemplatePlugin({ renderer })] : []),
......
import { Plugin } from 'vite'
import { parseRenderjs } from '@dcloudio/uni-cli-shared'
export function uniRenderjsPlugin(): Plugin {
return {
name: 'uni:app-nvue-renderjs',
async transform(code, id) {
const { type } = parseRenderjs(id)
if (!type) {
return
}
return {
code: `export default {}`,
map: { mappings: '' },
}
},
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册