diff --git a/test/fixtures/postcss/package.json b/test/fixtures/postcss/package.json index ff4f0e14d6ae..417914c1225c 100644 --- a/test/fixtures/postcss/package.json +++ b/test/fixtures/postcss/package.json @@ -9,5 +9,8 @@ "astro": "workspace:*", "autoprefixer": "^10.4.7", "postcss": "^8.4.14" + }, + "devDependencies": { + "postcss-preset-env": "^7.7.1" } } diff --git a/test/fixtures/postcss/postcss.config.cjs b/test/fixtures/postcss/postcss.config.cjs index 019f40040028..7ed7dd7e2dd9 100644 --- a/test/fixtures/postcss/postcss.config.cjs +++ b/test/fixtures/postcss/postcss.config.cjs @@ -1,7 +1,12 @@ +const postcssPresetEnv = require('postcss-preset-env') +const autoPrefixer = require('autoprefixer') + module.exports = { - plugins: { - autoprefixer: { + plugins: [ + // included to ensure public/ CSS resources are NOT transformed + autoPrefixer({ overrideBrowserslist: ['> 0.1%', 'IE 11'] // enforce `appearance: none;` is prefixed with -webkit and -moz - } - } -}; + }), + postcssPresetEnv({ features: { 'nesting-rules': true } }), + ] +} diff --git a/test/fixtures/postcss/src/components/Astro.astro b/test/fixtures/postcss/src/components/Astro.astro index c85cd0415db6..5563e477865d 100644 --- a/test/fixtures/postcss/src/components/Astro.astro +++ b/test/fixtures/postcss/src/components/Astro.astro @@ -1,9 +1,11 @@ -