mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: webpack error reporting + unintentional whitespace changes
This commit is contained in:
parent
57c2d72e21
commit
4910838ab1
@ -129,7 +129,7 @@ async function build(options){
|
||||
for(let i = 0; i < js_paths.length; i++){
|
||||
main_array.push(path.join(__dirname, 'src', js_paths[i]));
|
||||
}
|
||||
await webpack({
|
||||
const webpack_opts = {
|
||||
...(await BaseConfig({
|
||||
...options,
|
||||
env: 'prod',
|
||||
@ -138,12 +138,15 @@ async function build(options){
|
||||
optimization: {
|
||||
minimize: true,
|
||||
},
|
||||
}, (err, stats) => {
|
||||
if(err){
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
if(options?.verbose)
|
||||
console.log('webpack opts', webpack_opts);
|
||||
await webpack(webpack_opts, (err, stats) => {
|
||||
if(err){
|
||||
throw err;
|
||||
// console.error(err);
|
||||
// return;
|
||||
}
|
||||
//if(options?.verbose)
|
||||
console.log(stats.toString());
|
||||
// write to ./dist/bundle.min.js
|
||||
// fs.writeFileSync(path.join(__dirname, 'dist', 'bundle.min.js'), fs.readFileSync(path.join(__dirname, 'dist', 'main.js')));
|
||||
|
Loading…
Reference in New Issue
Block a user