I have created a Vue
project with Typescript
having components in class style. I need to include some external CSS file - like from Amazon S3
. The CSS doesn't seems to be loaded.
In the network section I can see it.
I have created a Vue
project with Typescript
having components in class style. I need to include some external CSS file - like from Amazon S3
. The CSS doesn't seems to be loaded.
In the network section I can see it.
I suggest you to use preprocessor
Install SASS
-
npm install -D sass-loader sass
then You will be able to import
it in your App.vue
<style lang="scss">
@import './static/css/style.css';
</style>
Update
I figured out one more way to include single css
file.
In your App.vue
, you can add css
file to style src
<style src="relative-path/style.css"></style>
you can load external URL
<style lang="scss or less">
@import "https://external_url_.css";
@import ".../assest/_.css";
</style>
you can load css loaders installed if you more such as sass-loader, css-loader , less-loader
npm