Comments (7)
Yes that's right
from vue-multiple-pages.
The css code for modal is created in the '<style></style>' markup of the html.The extracted css is the common part among all the entries.
from vue-multiple-pages.
@Plortinus but output .css file doesn't contains css code for modal. Another problem that I found is: I have two pages, if they are both have imported modal import Modal from 'components/modal.vue'
everything works fine, but if one haven't then the output .css file doesn't have css code for modal. How can I fix that? Please help!
from vue-multiple-pages.
I changed the webpack.config.js
. Now, it can extract css from the .vue
file into a single css file for that page.
from vue-multiple-pages.
@Plortinus thank you man, you're amazing. Can please show how to setup up postcss? To be able to use it like <style lang="postcss"
. I tried this but seems like it doesn't works
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
css: ExtractTextPlugin.extract({
fallback: 'style-loader'
use: [
{
loader: 'css-loader',
options: { importLoaders: 1 }
},
'postcss-loader'
]
})
}
}
},
from vue-multiple-pages.
Check postcss
branch to see the changes.
from vue-multiple-pages.
@Plortinus Great, thank you so much. To be able to compile postcss from .css files I need to add this:
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
use: ['css-loader', 'postcss-loader'],
fallback: 'style-loader'
})
},
Right?
from vue-multiple-pages.
Related Issues (20)
- postcss没有编译 HOT 4
- 为什么不支持 es6 语法 HOT 5
- webpack可以弄成增量打包多页吗 HOT 1
- 搭建的多页面项目,跳转时会出现短暂的空白
- 我想升级webpack4,直接用你新的框架,把以前的src里面的文件夹都复制进去 HOT 2
- 如何使用vue-router 是否可以提供一个例子? HOT 7
- js里面如果有中文构建后会出现乱码 HOT 3
- extract-text-webpack-plugin应该被替换成mini-css-extract-plugin HOT 2
- 打包文件fill:\\\形式访问不对 HOT 1
- npm run dev 验证表单报错 HOT 7
- 当有 6 多页面时, build 一直卡着不动,删掉一个多页面能成功 build HOT 3
- Think you so much for sharing this framework ! Could you provide any code to support network request ? HOT 2
- Extra code? HOT 3
- Handle/simulate 404 error? HOT 1
- Readme doesn't mention that page titles are optional and could be missed
- Work together with vue-cli-plugin-pages
- Adding module error HOT 1
- can't auto open Browser
- please doc what this mean ? (remove named-chunk plugin)
- Why does the compiled page report errors and have no content
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-multiple-pages.