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

Ignore doesn't work #54

Open
Stepasy opened this issue Feb 6, 2019 · 4 comments
Open

Ignore doesn't work #54

Stepasy opened this issue Feb 6, 2019 · 4 comments

Comments

@Stepasy
Copy link

Stepasy commented Feb 6, 2019

Hi. Started using your plugin and faced the problem that the "ignore" option doesn't work

Here is the code example

critical: {
      test: {
        base: './',
        css: 'source/css/main.css',
        width: 1200,
        height: 600,
        minify: true,
        extract: true,
        ignore: ['@font-face'],
        src: 'output_dev/index.html',
        dest: 'output_dev/index-critical.html',
      }
    },
@bezoerb
Copy link
Owner

bezoerb commented Feb 9, 2019

@Stepasy: can you provide a failing testcase?

@serkanbektas
Copy link

serkanbektas commented Jan 17, 2020

ignore: ['@font-face']
or
ignore: { atrule: ['@font-face'], },

not working for me too.

font-face block is already in the output file.

@jlballes
Copy link

Hi. Same problem with ignore option as @serkanbektas explained

@jlballes
Copy link

jlballes commented May 26, 2022

My fault! "ignore" works great.
I forgot to add "ignore" within "options".
Example:

critical: {
    test: {
        options: {
            base: './',
            css: [
                'test/fixture/styles/main.css',
                'test/fixture/styles/bootstrap.css'
            ],
            width: 320,
            height: 70,
            ignore: ['@font-face', 'background-image']
        },
        src: 'test/fixture/index.html',
        dest: 'test/generated/critical.css'
    }
}

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

4 participants