Home > front end >  Parsing Error when adding Bootstrap to Vue 3
Parsing Error when adding Bootstrap to Vue 3

Time:09-17

I would like to add bootstrap to my Vue 3 project. I added bootstrap through typing cd <my-app> then vue add bootstrap-vue. After i have installed bootsrap i get an error in terminal telling me that i have an Parsing error: Unexpected token (10:4) and Declaration or statement expected. this error seems to occur in my vue.confiq.js file, where i have an red sqiggle. Anyone know how to solve this problem?

parsing error bootstrap vue 3

CodePudding user response:

That's because your css object is outside your config? From the looks of it, it should rather be inside the defineConfig.

module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      sass: {},
      scss: {},
    }
  }
});
  • Related