Skip to content
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

Build Tooling: Remove WebpackRTLPlugin #15711

Merged
merged 1 commit into from
May 17, 2019
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented May 17, 2019

Closes #15146

This pull request seeks to remove the WebpackRTLPlugin. The plugin is no longer necessary, as there is otherwise RTL CSS generated through the packages build script. The Webpack build configuration is only responsible for copying these built files:

new CopyWebpackPlugin(
gutenbergPackages.map( ( packageName ) => ( {
from: `./packages/${ packageName }/build-style/*.css`,
to: `./build/${ packageName }/`,
flatten: true,
transform: ( content ) => {
if ( defaultConfig.mode === 'production' ) {
return postcss( [
require( 'cssnano' )( {
preset: [ 'default', {
discardComments: {
removeAll: true,
},
} ],
} ),
] )
.process( content, { from: 'src/app.css', to: 'dest/app.css' } )
.then( ( result ) => result.css );
}
return content;
},
} ) )
),

The plugin is also slated to become broken due to removed deprecations with Webpack 5.x , and would otherwise need to be updated.

Testing Instructions:

Verify there are no regressions in the CSS RTL output from the build.

cc @yoavf

@aduth aduth added the [Type] Build Tooling Issues or PRs related to build tooling label May 17, 2019
@aduth aduth requested review from gziolo and youknowriad May 17, 2019 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build: Remove WebpackRTLPlugin
2 participants