Standalone webpack compile/watch API for @component-controls.
$ npm install @component-controls/webpack-compile --save-devimport { compile } from '@component-controls/webpack-compile';
...
const { store } = await compile({
presets: ['react', 'react-docgen-typescript'],
configPath: path.resolve(__dirname, 'fixtures', 'examples'),
});
async function
compile the stories with webpack returns the stories store object
defined in @component-controls/webpack-compile/core/webpack-compile/src/index.ts
parameters
| Name | Type | Description |
|---|---|---|
| anonymous* |
|
configuration properties for compile and run |
callback |
function (
|
callback function to monitor new documents/deleted documents |
returns |
Promise<CompileResults> |
async function
compile the stories with webpack and launch watching for changes returns the stories store object
defined in @component-controls/webpack-compile/core/webpack-compile/src/index.ts
parameters
| Name | Type | Description |
|---|---|---|
| anonymous* |
|
adds webpack WatchOptions to the Compiler options |
callback |
function (
|
callback function to monitor new documents/deleted documents |
returns |
Promise<CompileResults> |