Skip to content

Commit

Permalink
generate separate stylesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Jun 9, 2021
1 parent 9efab2c commit 009e7fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ if ( files.length ) {
`${ PACKAGES_DIR }/*/src/*.scss`,
`${ PACKAGES_DIR }/block-library/src/**/*.js`,
`${ PACKAGES_DIR }/block-library/src/*/style.scss`,
`${ PACKAGES_DIR }/block-library/src/*/theme.scss`,
`${ PACKAGES_DIR }/block-library/src/*/editor.scss`,
`${ PACKAGES_DIR }/block-library/src/*.scss`,
],
Expand Down
16 changes: 16 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,22 @@ module.exports = {
to: 'build/block-library/blocks/[1]/editor-rtl.css',
transform: stylesTransform,
},
{
from: './packages/block-library/build-style/*/theme.css',
test: new RegExp(
`([\\w-]+)${ escapeRegExp( sep ) }theme\\.css$`
),
to: 'build/block-library/blocks/[1]/theme.css',
transform: stylesTransform,
},
{
from: './packages/block-library/build-style/*/theme-rtl.css',
test: new RegExp(
`([\\w-]+)${ escapeRegExp( sep ) }theme-rtl\\.css$`
),
to: 'build/block-library/blocks/[1]/theme-rtl.css',
transform: stylesTransform,
},
] ),
new CopyWebpackPlugin(
Object.entries( {
Expand Down

0 comments on commit 009e7fa

Please sign in to comment.