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
|
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:
|
||||||
|
|
|
||||||
|
|
@ -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'",
|
"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",
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue