Below this statement, you can find the console error message:
script5017 syntax error in regular expression
chunk-vendors.js (96290,5)
chunk-vendors.js
!*** ./node_modules/core-js/modules/es.regexp.constructor.js ***!
...
result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype, RegExpWrapper); // line 96290
...
main.js
import 'core-js/stable'
import "core-js/es/symbol";
import 'regenerator-runtime/runtime'
import 'intersection-observer' // Optional
import Vue from 'vue'
import App from './App.vue'
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
// fontawesome 6.1.1
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { fas } from '@fortawesome/free-solid-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
// Import Bootstrap and BootstrapVue CSS files (ensure correct order)
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
// Use BootstrapVue globally
Vue.use(BootstrapVue)
// Optionally install BootstrapVue icon components plugin
Vue.use(IconsPlugin)
Vue.component('font-awesome-icon', FontAwesomeIcon)
Vue.config.productionTip = false
new Vue({
router,
render: h => h(App),
}).$mount('#app')
library.add(
fas,
far
)
I have noticed some conflicts between BootstrapVue
and fortawesome
. Sometimes it fails to load properly while using them together, especially in Chrome. To address this issue, a specific statement has been included in this source code.
However, I am uncertain why the script 5017 error occurs when loading JavaScript. Could this be related to a core-js
or BootstrapVue
problem?
The versions I used are:
@fortawesome/fontawesome-common-types
6.1.1
@fortawesome/vue-fontawesome
2.0.6
core-js
3.20.2
bootstrap
4.6.1
bootstrap-vue
2.21.2