mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#242: build dlls during dev server start
This commit is contained in:
21
scripts/build-dll.js
Normal file
21
scripts/build-dll.js
Normal file
@ -0,0 +1,21 @@
|
||||
/* eslint-env node */
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const webpack = require('webpack');
|
||||
const chalk = require('chalk');
|
||||
|
||||
const webpackConfig = require('../webpack.dll.config.js');
|
||||
|
||||
const compiler = webpack(webpackConfig);
|
||||
|
||||
compiler.run(function(err, stats) {
|
||||
if (err) {
|
||||
console.error(chalk.red(err));
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.error(
|
||||
chalk.green('Dll was successfully build in %s ms'),
|
||||
stats.endTime - stats.startTime
|
||||
);
|
||||
});
|
Reference in New Issue
Block a user