Skip to content

PostCSS plugin and import globs #586

Answered by oscarotero
cgwrench asked this question in Q&A
Discussion options

You must be logged in to vote

Lume automatically use the postcssImport if the includes option is defined.
If the glob plugin must be defined before, you must disable the includes option, so this plugin is not added automatically:

site.use(postcss({
    includes: false, // disable the postcss-import plugin
    plugins: [
        postcssImportExtGlob(), // must be placed before `postcss-import`
        postcssImport({
            plugins: [
                stylelint()
            ]
        }),
        postcssUrl,
        postcssPresetEnv({ stage: 0 }), // polyfill all features
        postcssReporter({ clearReportedMessages: true })
    ],
    useDefaultPlugins: false,
}));

Keep in mind that an imported file doesn't pre…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cgwrench
Comment options

Answer selected by cgwrench
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants