Giter Site home page Giter Site logo

CSS output issue about vue-multiple-pages HOT 7 CLOSED

plortinus avatar plortinus commented on August 15, 2024
CSS output issue

from vue-multiple-pages.

Comments (7)

Plortinus avatar Plortinus commented on August 15, 2024 1

Yes that's right

from vue-multiple-pages.

Plortinus avatar Plortinus commented on August 15, 2024

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.

lavezzi1 avatar lavezzi1 commented on August 15, 2024

@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.

Plortinus avatar Plortinus commented on August 15, 2024

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.

lavezzi1 avatar lavezzi1 commented on August 15, 2024

@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.

Plortinus avatar Plortinus commented on August 15, 2024

Check postcss branch to see the changes.

from vue-multiple-pages.

lavezzi1 avatar lavezzi1 commented on August 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.