Fix yarn postcss (#18711)

* Remove postcss-cssnext

* Remove redundant code

* Update postcss-preset-env

* Account for fingerprinting
This commit is contained in:
Mac Siri 2022-11-11 09:57:11 -05:00 committed by GitHub
parent 5519fe563c
commit 4aa053201c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 396 additions and 540 deletions

View file

@ -128,6 +128,8 @@ jobs:
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
bundler-cache: true bundler-cache: true
- run: bundle exec rails assets:precompile
- run: yarn run postcss
- run: bin/test-console-check - run: bin/test-console-check
Cypress: Cypress:

View file

@ -1,3 +0,0 @@
plugins:
postcss-smart-import: {}
postcss-cssnext: {}

View file

@ -24,7 +24,7 @@
"lint:frontend": "eslint 'app/assets/javascripts/**/*.js' 'app/javascript/**/*.jsx' 'app/javascript/**/*.js' 'cypress/**/*.js'", "lint:frontend": "eslint 'app/assets/javascripts/**/*.js' 'app/javascript/**/*.jsx' 'app/javascript/**/*.js' 'cypress/**/*.js'",
"test": "jest app/javascript/ bin/ --coverage", "test": "jest app/javascript/ bin/ --coverage",
"test:watch": "jest app/javascript/ bin/ --watch", "test:watch": "jest app/javascript/ bin/ --watch",
"postcss": "postcss public/assets/*.css -d public/assets 2> postcss_error.log", "postcss": "postcss public/assets/*.css -d public/assets",
"e2e": "bin/e2e", "e2e": "bin/e2e",
"e2e:creator-onboarding-seed": "yarn run e2e --creator-onboarding-seed" "e2e:creator-onboarding-seed": "yarn run e2e --creator-onboarding-seed"
}, },
@ -132,8 +132,8 @@
"moment": "^2.29.4", "moment": "^2.29.4",
"postcss": "^8.4.18", "postcss": "^8.4.18",
"postcss-cli": "^10.0.0", "postcss-cli": "^10.0.0",
"postcss-cssnext": "^3.1.0", "postcss-import": "^15.0.0",
"postcss-smart-import": "^0.7.6", "postcss-preset-env": "^7.8.2",
"postscribe": "^2.0.8", "postscribe": "^2.0.8",
"preact": "^10.11.2", "preact": "^10.11.2",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",

View file

@ -1,12 +1,18 @@
/* globals module, require */ /* globals module, require */
module.exports = { module.exports = {
plugins: [ plugins: [
require('postcss-import'), require('postcss-import')({
resolve: function(id, basedir) {
if (id.startsWith('/assets/react-dates/')) {
return require('path').resolve(process.cwd(), "node_modules/react-dates/lib/css/_datepicker.css");
} else {
return require('path').resolve(basedir, id);
}
}
}),
require('postcss-flexbugs-fixes'), require('postcss-flexbugs-fixes'),
require('postcss-preset-env')({ require('postcss-preset-env')({
autoprefixer: { autoprefixer: { flexbox: 'no-2009' },
flexbox: 'no-2009',
},
stage: 3, stage: 3,
}), }),
], ],

911
yarn.lock

File diff suppressed because it is too large Load diff