From 4e53c02dd4c2d4bd064e76f79a1a433eda6d698f Mon Sep 17 00:00:00 2001 From: devilwjp <9700616@qq.com> Date: Fri, 24 May 2024 22:13:21 +0800 Subject: [PATCH] fix: #127 --- vite/esm/index.js | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/vite/esm/index.js b/vite/esm/index.js index 81e221f..ffbcfb3 100644 --- a/vite/esm/index.js +++ b/vite/esm/index.js @@ -1,24 +1,6 @@ -const vue = require('@vitejs/plugin-vue') -const react = require('@vitejs/plugin-react') -const vueJsx = require('@vitejs/plugin-vue-jsx') -// const requireTransform = require('vite-plugin-require-transform').default -// function ReactDOMTransformPlugin() { -// return { -// async resolveId(source, importer, options) { -// if (source.match(/react-dom\/client/)) { -// const resolution = await this.resolve(source, importer, { skipSelf: true, ...options }) -// if (!resolution) { -// return { id: 'veaury-fake-react-dom-client', moduleSideEffects: true } -// } -// } -// }, -// load(id) { -// if (id === 'veaury-fake-react-dom-client') { -// return `export * from 'react-dom'; export {default} from 'react-dom';` -// } -// } -// } -// } +import vue from '@vitejs/plugin-vue' +import react from '@vitejs/plugin-react' +import vueJsx from '@vitejs/plugin-vue-jsx' function veauryVitePlugins({type, vueJsxInclude, vueJsxExclude, vueOptions = {}, vueJsxOptions: initVueJsxOptions = {}, reactOptions = {}}) { @@ -64,4 +46,4 @@ function veauryVitePlugins({type, vueJsxInclude, vueJsxExclude, vueOptions = {}, ] } -module.exports = veauryVitePlugins +export default veauryVitePlugins