mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +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