Fix yarn postcss (#18711)
* Remove postcss-cssnext * Remove redundant code * Update postcss-preset-env * Account for fingerprinting
This commit is contained in:
parent
5519fe563c
commit
4aa053201c
5 changed files with 396 additions and 540 deletions
2
.github/workflows/ci-cd.yml
vendored
2
.github/workflows/ci-cd.yml
vendored
|
|
@ -128,6 +128,8 @@ jobs:
|
|||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
- run: bundle exec rails assets:precompile
|
||||
- run: yarn run postcss
|
||||
- run: bin/test-console-check
|
||||
|
||||
Cypress:
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
plugins:
|
||||
postcss-smart-import: {}
|
||||
postcss-cssnext: {}
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
"lint:frontend": "eslint 'app/assets/javascripts/**/*.js' 'app/javascript/**/*.jsx' 'app/javascript/**/*.js' 'cypress/**/*.js'",
|
||||
"test": "jest app/javascript/ bin/ --coverage",
|
||||
"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:creator-onboarding-seed": "yarn run e2e --creator-onboarding-seed"
|
||||
},
|
||||
|
|
@ -132,8 +132,8 @@
|
|||
"moment": "^2.29.4",
|
||||
"postcss": "^8.4.18",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"postcss-cssnext": "^3.1.0",
|
||||
"postcss-smart-import": "^0.7.6",
|
||||
"postcss-import": "^15.0.0",
|
||||
"postcss-preset-env": "^7.8.2",
|
||||
"postscribe": "^2.0.8",
|
||||
"preact": "^10.11.2",
|
||||
"prop-types": "^15.8.1",
|
||||
|
|
|
|||
|
|
@ -1,12 +1,18 @@
|
|||
/* globals module, require */
|
||||
module.exports = {
|
||||
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-preset-env')({
|
||||
autoprefixer: {
|
||||
flexbox: 'no-2009',
|
||||
},
|
||||
autoprefixer: { flexbox: 'no-2009' },
|
||||
stage: 3,
|
||||
}),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue