Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const webpack = require('webpack')
const path = require('path')
const generateWebpackConfig = require('@skpm/builder').webpackConfig
generateWebpackConfig(
{},
path.join(process.cwd(), './.scripts'),
path.join(process.cwd(), './.scripts'),
{}
)({
isPluginCommand: true,
script: path.basename(process.argv[2]),
absolutePath: process.argv[2],
handlers: ['onRun'],
})
.then(webpackConfig => {
const compiler = webpack(webpackConfig)
return compiler.run((err, res) => {
if (err) {
console.error(err)