rollup
作者:互联网
-
1、@rollup/plugin-commonjs :Since most packages in your node_modules folder are probably legacy CommonJS rather than JavaScript modules, you may need to use @rollup/plugin-commonjs:
-
2、@rollup/plugin-node-resolve:using third party modules in node_modules
-
3、@rollup/plugin-babel
并且使用@rollup/plugin-commonjs
babel({
exclude: 'node_modules/**' // 解决打包后存在require 问题
}),
commonjs()
标签:node,commonjs,plugin,babel,modules,rollup 来源: https://www.cnblogs.com/Running00/p/15851196.html