問題描述:
當我們在使用rollup編譯es6時,可能會遇到以下報錯問題
Error: 'default' is not exported by node_modules\jquery\dist\jquery.js, imported by node_modules\bootstrap\js\src\util.js
解決方案:文章來源:http://www.zghlxwxcb.cn/news/detail-597825.html
- 安裝@rollup/plugin-commonjs插件
npm install @rollup/plugin-commonjs --save-dev
? 最后,修改rollup.config.js文件中寫入以下代碼即可文章來源地址http://www.zghlxwxcb.cn/news/detail-597825.html
import commonjs from '@rollup/plugin-commonjs'
plugins: [
commonjs(),
]
到了這里,關于打包報錯Error: ‘default‘ is not exported by node_modules/qs/lib/index.js的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!