build-plugin.js
441 Bytes
#!/usr/bin/env node
const execSync = require('child_process').execSync;
const path = require('path')
const webpack = require('webpack')
const config = require(path.resolve(__dirname, '../config/webpack.plugin.js'))
webpack(config, (err) => {
if (err) {
console.log(err)
}
})
// execSync(`npx cross-env NODE_ENV=production webpack build --config ${path.resolve(__dirname, '../config/webpack.plugin.js')}`, { stdio: 'inherit' });