5db5c8b110
* Add tour-kit component * Add @types/wordpress__viewport to @woocommerce/components devDeps * Add tour-kit README.md * Add primaryButtonText option to tour kit step meta * Add changelog * Remove unneeded style import * Set position and z-index style for tour-kit * Add disable primary button feature for tour kit * Export TourKitTypes * Update style-build config for @automattic/* packages * Add @automattic/* deps for components * Ignore fs in webpack.config.js * Update tour-kit stories * Add tour-kit tests * Update tour-kit README.md * Update tour-kit types * Update webpack.config.js * Update style.scss * Add auto focus feature * Update type doc |
||
---|---|---|
.. | ||
abstracts | ||
changelog | ||
.eslintrc.js | ||
.npmrc | ||
README.md | ||
index.js | ||
package.json | ||
project.json |
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,
};