我正在使用 vue.js、webpack、npm 和 jQuery。现在我想在我的项目中包含框架 bootstrap-vue。我通过 npm遵循了https://bootstrap-vue.js.org/docs的指南,并包含了 bootstrap-vue。在启动 npm 的构建过程时,我在 babel-runtime 中遇到了太多错误,例如:
ERROR in ./node_modules/bootstrap-vue/es/utils/popover.class.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/typeof' in
'C:\Users\abdul\WebstormProjects\editor\node_modules\
bootstrap-vue\es\utils'
@ ./node_modules/bootstrap-vue/es/utils/popover.class.js 10:38-78
@ ./node_modules/bootstrap-vue/es/directives/popover/popover.js
@ ./node_modules/bootstrap-vue/es/directives/popover/index.js
@ ./node_modules/bootstrap-vue/es/directives/index.js
@ ./node_modules/bootstrap-vue/es/index.js
@ ./src/main.js
Run Code Online (Sandbox Code Playgroud)
主要.js:
import Vue from 'vue'
import App from './App'
import router from './router'
import 'jquery'
import BootstrapVue from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.use(BootstrapVue)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '<App/>',
components: { App …Run Code Online (Sandbox Code Playgroud)