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

How to use this plugin with Nuxt.js #20

Closed
strunkie30 opened this Issue May 29, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@strunkie30
Copy link

strunkie30 commented May 29, 2018

How to use this plugin with Nuxt.js? The following configuration does not work.

Nuxt configuration

build: {
    postcss: (loader) => [
        require('iconfont-webpack-plugin')({ resolve: loader.resolve })
    ]
}

SCSS code

p {
    &:before {
        content: "";
        font-icon: url('~/assets/icons/arrow-left.svg');
        transition: 0.5s color;
    }
}

Compiled CSS

p:before {
    content: "";
    font-icon: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjMDAwMDAwIiBoZWlnaHQ9IjI0IiB2aWV3Q…Z6Ii8+CiAgICA8cGF0aCBkPSJNMC0uNWgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPgo8L3N2Zz4=);
    -webkit-transition: 0.5s color;
    transition: 0.5s color;
}
@jantimon

This comment has been minimized.

Copy link
Owner

jantimon commented May 29, 2018

It looks like your css loader is used before the postcss processing.
Can you turn this around?

@strunkie30

This comment has been minimized.

Copy link

strunkie30 commented May 29, 2018

I can't change this in de Nuxt.js configuration. I'am going to create a new issue on the Nuxt.js repo.

@jantimon jantimon closed this Aug 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment