mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
docs: add warning about dynamic import of css (#21805)
This commit is contained in:
parent
e49645bfb9
commit
dc329c32aa
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user