Exploring the world of Vue with webpack, I find myself curious about the various ways to import CSS. It appears that there are three methods for importing CSS:
- Adding style sheets directly to HTML headers:
<link type="text/css" rel="stylesheet" ... >
- Importing CSS files from JS files (such as main.js):
import '@/assets/css/app.cs'
/require
- Importing CSS files within Vue style tags:
<style>@import '...'</style>
When should we choose one import method over another? What are the recommended practices for handling CSS imports in Vue projects?