require 转 import插件
npm i -D rollup-plugin-requiretoimport
import requireToImportPlugin from 'rollup-plugin-requiretoimport';
export default defineConfig({
plugins: [
requireToImportPlugin()
]
})
this is plugins for rollup to deal with dependence code turn require into import
JavaScript