woocommerce/plugins/woocommerce-admin/packages/style-build
Jeff Stieler d3e940208e Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531)
* Build experimental package CSS with webpack.

* Move style-only webpack config to reusable private package.

* Update other packages to use webpack for style builds.

* Add tsbuildinfo to clean scripts.

* Fix main start script.

* Remove defunct package build scripts.

* Move client/ dependencies for style builds.

* DRY.

* Remove defunct IE stylesheet definitions.

* Add missing RTL setup for onboarding styles.

* No need to export a function.

* Add changelog.

* Fix README.

* Revert concurrently script path change.
2021-08-19 10:15:59 -04:00
..
abstracts Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531) 2021-08-19 10:15:59 -04:00
.npmrc Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531) 2021-08-19 10:15:59 -04:00
README.md Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531) 2021-08-19 10:15:59 -04:00
index.js Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531) 2021-08-19 10:15:59 -04:00
package.json Refactor package style builds (https://github.com/woocommerce/woocommerce-admin/pull/7531) 2021-08-19 10:15:59 -04:00

README.md

Style Build Helper

This is a partial Webpack config for building WooCommece component styles using base styles from Gutenberg. It is used to replace the bin/packages/build.js script.

Usage

Create a webpack.config.js in your package root that defines the entry and output, making use of the rules and plugins from @woocommerce/style-build.

Note: The entry should be named 'build-style' so the CSS will get picked up by the main client/ application's CopyWebpackPlugin config.

// packages/<package-name>/webpack.config.js

import { webpackConfig } from '@woocommerce/style-build';

module.exports = {
	mode: process.env.NODE_ENV || 'development',
	entry: {
		'build-style': __dirname + '/src/style.scss',
	},
	output: {
		path: __dirname,
	},
	module: {
		rules: webpackConfig.rules,
	},
	plugins: webpackConfig.plugins,
};