0

I am working on a CSS documentation with VuePress, and don't manage to import a .css file into a component. The website is quite old and there are still differences between desktop, smartphone... so I need to be able to import a precise .css file into a Vue component.

I did this:

<style lang="scss" scoped>

@import url('...');

</style>

But it doesn't work. Importing it into the config.js will not allow me to change .css files, and I need to to be able to choose depending upon the component.

Does anyone have an idea? Thanks.

Grégory Huyghe
  • 422
  • 1
  • 6
  • 18
  • 1
    Does this answer your question? [How to load external CSS in Vue](https://stackoverflow.com/questions/57686219/how-to-load-external-css-in-vue) – Michal Levý Oct 16 '20 at 12:37
  • @MichalLevý Thanks, two mistakes in my code, first the wrong link... and second, url() not needed. – Grégory Huyghe Oct 16 '20 at 12:51

1 Answers1

0

I had 2 errors.

First the wrong link... sorry to not have seen it earlier.

Second, @import '...' is enough, no need of url('').

Grégory Huyghe
  • 422
  • 1
  • 6
  • 18