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

How to use this plugin with Nuxt.js #20

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

How to use this plugin with Nuxt.js #20

strunkie30 opened this issue May 29, 2018 · 2 comments

Comments

@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
Copy link
Owner

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

@strunkie30
Copy link
Author

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

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