Skip to content

Commit 748e265

Browse files
authored
PostCSS: Use postcss-preset-env to polyfill newer CSS syntax to older browser targets (#8567)
see https://github.com/csstools/postcss-plugins/tree/1ac4688fdcc27fa894cb87b0074df6d873635cba/plugin-packs/postcss-preset-env This ensures that we are using the right vendor prefixes where necessary (e.g. `-webkit-text-decoration` in addition to `text-decoration`).
1 parent 13a91f5 commit 748e265

File tree

3 files changed

+901
-1
lines changed

3 files changed

+901
-1
lines changed

ember-cli-build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module.exports = function (defaults) {
66
let env = EmberApp.env();
77
let isProd = env === 'production';
88

9+
let browsers = require('./config/targets').browsers;
10+
911
let app = new EmberApp(defaults, {
1012
'@embroider/macros': {
1113
setConfig: {
@@ -44,6 +46,7 @@ module.exports = function (defaults) {
4446
extension: 'module.css',
4547
plugins: {
4648
before: [require('postcss-nested')],
49+
postprocess: [require('postcss-preset-env')({ browsers, preserve: false })],
4750
},
4851
},
4952
fingerprint: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
"normalize.css": "8.0.1",
130130
"nyc": "15.1.0",
131131
"postcss-nested": "6.0.1",
132+
"postcss-preset-env": "9.5.9",
132133
"prettier": "3.2.5",
133134
"qunit": "2.20.1",
134135
"qunit-console-grouper": "0.3.0",

0 commit comments

Comments
 (0)