Rename PostCSS files to .pcss
(#22769)
* Rename PostCSS files to `.pcss` * Make Stylelint happy * Make Stylelint happy v2 * Update CompatibilityView.tsx * Update res/css/structures/ErrorView.pcss Co-authored-by: Michael Weimann <mail@michael-weimann.eu> * Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/pcss Conflicts: package.json res/css/_components.scss res/css/structures/_NotificationPanel.pcss res/css/views/dialogs/_SpotlightDialog.pcss res/css/views/rooms/_EventTile.pcss res/css/views/rooms/_ReadReceiptGroup.pcss yarn.lock * Only use CI_PACKAGE mode on develop, it skips minification which can find some errors * Keep name to not break existing PRs Co-authored-by: Michael Weimann <mail@michael-weimann.eu>
This commit is contained in:
parent
ecda0a1073
commit
64ed6ebdad
12 changed files with 144 additions and 440 deletions
|
@ -21,14 +21,14 @@ if (!process.env.VERSION) {
|
|||
|
||||
const cssThemes = {
|
||||
// CSS themes
|
||||
"theme-legacy-light": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.scss",
|
||||
"theme-legacy-dark": "./node_modules/matrix-react-sdk/res/themes/legacy-dark/css/legacy-dark.scss",
|
||||
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
|
||||
"theme-legacy-light": "./node_modules/matrix-react-sdk/res/themes/legacy-light/css/legacy-light.pcss",
|
||||
"theme-legacy-dark": "./node_modules/matrix-react-sdk/res/themes/legacy-dark/css/legacy-dark.pcss",
|
||||
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.pcss",
|
||||
"theme-light-high-contrast":
|
||||
"./node_modules/matrix-react-sdk/res/themes/light-high-contrast/css/light-high-contrast.scss",
|
||||
"theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.scss",
|
||||
"theme-light-custom": "./node_modules/matrix-react-sdk/res/themes/light-custom/css/light-custom.scss",
|
||||
"theme-dark-custom": "./node_modules/matrix-react-sdk/res/themes/dark-custom/css/dark-custom.scss",
|
||||
"./node_modules/matrix-react-sdk/res/themes/light-high-contrast/css/light-high-contrast.pcss",
|
||||
"theme-dark": "./node_modules/matrix-react-sdk/res/themes/dark/css/dark.pcss",
|
||||
"theme-light-custom": "./node_modules/matrix-react-sdk/res/themes/light-custom/css/light-custom.pcss",
|
||||
"theme-dark-custom": "./node_modules/matrix-react-sdk/res/themes/dark-custom/css/dark-custom.pcss",
|
||||
};
|
||||
|
||||
function getActiveThemes() {
|
||||
|
@ -300,10 +300,10 @@ module.exports = (env, argv) => {
|
|||
],
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
test: /\.pcss$/,
|
||||
use: [
|
||||
/**
|
||||
* This code is hopeful that no .scss outside of our themes will be directly imported in any
|
||||
* This code is hopeful that no .pcss outside of our themes will be directly imported in any
|
||||
* of the JS/TS files.
|
||||
* Should be MUCH better with webpack 5, but we're stuck to this solution for now.
|
||||
*/
|
||||
|
@ -349,8 +349,7 @@ module.exports = (env, argv) => {
|
|||
options: {
|
||||
sourceMap: true,
|
||||
plugins: () => [
|
||||
// Note that we use slightly different plugins for SCSS.
|
||||
|
||||
// Note that we use slightly different plugins for PostCSS.
|
||||
require('postcss-import')(),
|
||||
require("postcss-mixins")(),
|
||||
require("postcss-simple-vars")(),
|
||||
|
@ -502,7 +501,7 @@ module.exports = (env, argv) => {
|
|||
},
|
||||
{
|
||||
test: /\.svg$/,
|
||||
issuer: /\.(scss|css)$/,
|
||||
issuer: /\.(pcss|scss|css)$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
|
@ -528,7 +527,7 @@ module.exports = (env, argv) => {
|
|||
oneOf: [
|
||||
{
|
||||
// Assets referenced in CSS files
|
||||
issuer: /\.(scss|css)$/,
|
||||
issuer: /\.(pcss|scss|css)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
esModule: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue