Skip to content

fix (theme): WP browser list #456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/loaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const srcPath = path.resolve(__dirname, '../src')
const nodeModulesPath = path.resolve(__dirname, '../node_modules')
const browserslistConfig = require('@wordpress/browserslist-config')

function isEditor(loaderContext) {
return loaderContext.resource.indexOf('editor.scss') > -1
Expand Down Expand Up @@ -62,7 +63,7 @@ module.exports = {
plugins: {
'postcss-import': {},
'postcss-preset-env': {
browsers: 'last 2 versions, > 2%, not dead',
browsers: browserslistConfig,
stage: 2,
features: {
// https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"devDependencies": {
"@wordpress/blocks": "^11.16.0",
"@wordpress/browserslist-config": "^6.21.0",
"@wordpress/dependency-extraction-webpack-plugin": "^4.0.0",
"@wordpress/dom-ready": "^3.17.0",
"@wordpress/hooks": "^3.17.0",
Expand Down
2 changes: 1 addition & 1 deletion src/scss/03-base/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* ...
*/

@use "~@fontsource/poppins/scss/mixins" as Poppins;
@use "node_modules/@fontsource/poppins/scss/mixins" as Poppins;

@include Poppins.faces($weights: (300, 400, 500, 700), $styles: normal);
@include Poppins.faces($weights: (300, 400, 500, 700), $styles: italic);
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,13 @@ __metadata:
languageName: node
linkType: hard

"@wordpress/browserslist-config@npm:^6.21.0":
version: 6.21.0
resolution: "@wordpress/browserslist-config@npm:6.21.0"
checksum: 10/cc7d517b6aac44fee8a00b4f54746909edcb5ece14730fb34d8ad1f302d44df64398624332e459aee2db32fa3602c649a3526f61e5db03959cfdc997687507bd
languageName: node
linkType: hard

"@wordpress/compose@npm:^5.20.0":
version: 5.20.0
resolution: "@wordpress/compose@npm:5.20.0"
Expand Down Expand Up @@ -2094,6 +2101,7 @@ __metadata:
dependencies:
"@fontsource/poppins": "npm:^5.0.5"
"@wordpress/blocks": "npm:^11.16.0"
"@wordpress/browserslist-config": "npm:^6.21.0"
"@wordpress/dependency-extraction-webpack-plugin": "npm:^4.0.0"
"@wordpress/dom-ready": "npm:^3.17.0"
"@wordpress/hooks": "npm:^3.17.0"
Expand Down
Loading