Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const webpackServer = require('@pattern-lab/uikit-workshop/build/webpack-server.js');
const path = require('path');
const configFilePath = path.join(process.cwd(), './patternlab-config.json');
const config = require(configFilePath);
const patternlab = require('@pattern-lab/core')(config);
// build + start watch mode
patternlab.build({
watch: true,
cleanPublic: true,
});
webpackServer.serve(
patternlab,
configFilePath,
path.resolve(process.cwd(), config.paths.public.root)
);