woocommerce/packages/js/internal-style-build
Sam Seay 5becf47d60
Simplify turbo commands (#34055)
* Change package json commands and turbo repo config to allow for greatly simplifying running turbo
* Remove require-turbo script which was causing caching issues
* Colorize CI output from scripts
* Add missing changelog script to extend-cart-checkout-block
2022-08-05 12:03:17 +12:00
..
abstracts Prefixed Private JS Packages (#33218) 2022-05-31 15:42:00 -07:00
changelog Add helper tool for making sure build, lint, and test are run through Turborepo (#33573) 2022-06-28 13:17:05 -05:00
.eslintrc.js Prefixed Private JS Packages (#33218) 2022-05-31 15:42:00 -07:00
.npmrc Prefixed Private JS Packages (#33218) 2022-05-31 15:42:00 -07:00
README.md Prefixed Private JS Packages (#33218) 2022-05-31 15:42:00 -07:00
index.js Add tour kit component (#33229) 2022-06-08 17:16:31 +08:00
package.json Simplify turbo commands (#34055) 2022-08-05 12:03:17 +12: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/internal-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/internal-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,
};