mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
feat(test): add extraxt-css fixture
This commit is contained in:
parent
a91e6fa0db
commit
13bae199ab
11
test/fixtures/extract-css/assets/global.css
vendored
Normal file
11
test/fixtures/extract-css/assets/global.css
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
/* GLOBAL CSS */
|
||||
|
||||
body {
|
||||
background-color: rgb(28, 28, 28);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* END OF GLOBAL CSS */
|
15
test/fixtures/extract-css/layouts/default.vue
vendored
Normal file
15
test/fixtures/extract-css/layouts/default.vue
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<main>
|
||||
<nuxt/>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* LAYOUT CSS */
|
||||
main {
|
||||
border: 1px solid grey;
|
||||
border-radius: 8px;
|
||||
padding: 2rem;
|
||||
}
|
||||
/* END OF LAYOUT CSS */
|
||||
</style>
|
13
test/fixtures/extract-css/nuxt.config.js
vendored
Normal file
13
test/fixtures/extract-css/nuxt.config.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
export default {
|
||||
build: {
|
||||
extractCSS: true,
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
name: true
|
||||
}
|
||||
}
|
||||
},
|
||||
css: [
|
||||
'~/assets/global.css'
|
||||
]
|
||||
}
|
13
test/fixtures/extract-css/pages/index.vue
vendored
Normal file
13
test/fixtures/extract-css/pages/index.vue
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>I'm RED</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* INDEX CSS */
|
||||
h1 {
|
||||
color: red;
|
||||
}
|
||||
/* END OF INDEX CSS */
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user