webpack-auto-inject-version/demo/tests/helpers/webpack-compile.js

11 lines
252 B
JavaScript

const webpack = require('webpack');
export default function webpackCompile(webpackConfig, aivConfig) {
const compiler = webpack(webpackConfig(aivConfig));
return new Promise((resolve) => {
compiler.run(() => {
resolve();
});
});
}