Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue run build not packaging CSS correctly #977

Closed
AyushG3112 opened this issue Mar 13, 2018 · 2 comments
Closed

vue run build not packaging CSS correctly #977

AyushG3112 opened this issue Mar 13, 2018 · 2 comments

Comments

@AyushG3112
Copy link

Version

3.0.0-beta.6 ( tested both using vue create and vue init )

Reproduction link

https://github.com/AyushG3112/vue-build-css-parsing-error-repro

Steps to reproduce

  1. Clone and run npm install
  2. Run npm run serve, click the Show Loader button and notice the rotating snipper in the bottom right.
  3. Run npm run build, click the Show Loader button and run the production output from dist folder. Notice the missing Spinner

What is expected?

Spinner should appear in both the cases

What is actually happening?

Spinner appears in the npm run serve and NOT in npm run build


From initial debugging, it seems like the plugin contains some CSS like

    @-webkit-keyframes fill-unfill-rotate {
        12.5% {
            transform: rotate(135deg);
        }

        25% {
            transform: rotate(270deg);
        }

        37.5% {
            transform: rotate(405deg);
        }

        50% {
            transform: rotate(540deg);
        }

        62.5% {
            transform: rotate(675deg);
        }

        75% {
            transform: rotate(810deg);
        }

        87.5% {
            transform: rotate(945deg);
        }

        to {
            transform: rotate(1080deg);
        }

    ;
    }

    @-webkit-keyframes blue-fade-in-out {
        from {
            opacity: 1;
        }

        25% {
            opacity: 1;
        }

        26% {
            opacity: 0;
        }

        89% {
            opacity: 0;
        }

        90% {
            opacity: 1;
        }

        100% {
            opacity: 1;
        }

    ;
    }

    @-webkit-keyframes red-fade-in-out {
        from {
            opacity: 0;
        }

        15% {
            opacity: 0;
        }

        25% {
            opacity: 1;
        }

        50% {
            opacity: 1;
        }

        51% {
            opacity: 0;
        }

    ;
    }

    @-webkit-keyframes yellow-fade-in-out {
        from {
            opacity: 0;
        }

        40% {
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        75% {
            opacity: 1;
        }

        76% {
            opacity: 0;
        }

    ;
    }

    @-webkit-keyframes green-fade-in-out {
        from {
            opacity: 0;
        }

        65% {
            opacity: 0;
        }

        75% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            opacity: 0;
        }

    ;
    }

which is not being packaged in the build css generated

@AyushG3112 AyushG3112 changed the title vue run build not packaging CSS correctly vue run build not packaging CSS correctly Mar 13, 2018
@yyx990803
Copy link
Member

This is a problem of vue-full-loading itself. It contains only the prefixed version of the keyframes, which will be removed as part of the CSS optimization process because these prefixes are no longer necessary. The lib should at least include the non-prefixed version of these CSS rules.

AyushG3112 added a commit to AyushG3112/vue-full-loading that referenced this issue Apr 27, 2018
CSS Changelog:

1. Change `@-webkit-keyframes` to `@keyframes`
2. Add `animation` rules along with `-webkit-animation` for compatibility.

Fixes: PygmySlowLoris#11
Refs: vuejs/vue-cli#977
@AyushG3112
Copy link
Author

@yyx990803 thanks for the reply! Opened up a PR to fix this in vue-full-loading. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants