docs: add warning about dynamic import of css (#21805)

This commit is contained in:
Rayan Inerky 2023-06-27 11:53:38 +01:00 committed by GitHub
parent e49645bfb9
commit dc329c32aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,11 @@ You can use a javascript import, or a css [`@import` statement](https://develope
```vue [pages/index.vue] ```vue [pages/index.vue]
<script> <script>
// Use a static import for server-side compatibility
import '~/assets/css/first.css' import '~/assets/css/first.css'
// Caution: Dynamic imports are not server-side compatible
import('~/assets/css/first.css')
</script> </script>
<style> <style>