mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
update build script
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
// Do this as the first thing so that any code reading it knows the right env.
|
||||
process.env.BABEL_ENV = 'production';
|
||||
@@ -40,7 +40,7 @@ const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
|
||||
const isInteractive = process.stdout.isTTY;
|
||||
|
||||
// Warn and crash if required files are missing
|
||||
//! integrate to django, unneed this step
|
||||
// ! integrate to django, unneed this step
|
||||
// if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
|
||||
// process.exit(1);
|
||||
// }
|
||||
@@ -65,7 +65,7 @@ checkBrowsers(paths.appPath, isInteractive)
|
||||
// if you're in it, you don't end up in Trash
|
||||
fs.emptyDirSync(paths.appBuild);
|
||||
// Merge with the public folder
|
||||
//! seafile: no need do this
|
||||
// ! seafile: no need do this
|
||||
// copyPublicFolder();
|
||||
// Start the webpack build
|
||||
return build(previousFileSizes);
|
||||
@@ -138,6 +138,9 @@ checkBrowsers(paths.appPath, isInteractive)
|
||||
function build(previousFileSizes) {
|
||||
console.log('Creating an optimized production build...');
|
||||
|
||||
const { publicPath, ...rest } = config.output;
|
||||
config.output = rest;
|
||||
|
||||
const compiler = webpack(config);
|
||||
return new Promise((resolve, reject) => {
|
||||
compiler.run((err, stats) => {
|
||||
|
Reference in New Issue
Block a user