symlinked the png to decrease start time
parent
7f41ff4ed2
commit
a314e49dbc
|
|
@ -43,6 +43,7 @@ module.exports = {
|
|||
dotenv: resolveApp('.env'),
|
||||
appBuild: resolveApp('build'),
|
||||
appPublic: resolveApp('public'),
|
||||
appPng: resolveApp('public/png'),
|
||||
appHtml: resolveApp('public/index.html'),
|
||||
appIndexJs: resolveApp('src/index.tsx'),
|
||||
appPackageJson: resolveApp('package.json'),
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ measureFileSizesBeforeBuild(paths.appBuild)
|
|||
.then(previousFileSizes => {
|
||||
// Remove all content but keep the directory so that
|
||||
// if you're in it, you don't end up in Trash
|
||||
// fs.copySync
|
||||
fs.emptyDirSync(paths.appBuild);
|
||||
fs.ensureSymlink(paths.appPng,path.resolve(paths.appBuild,'png'));
|
||||
// Merge with the public folder
|
||||
copyPublicFolder();
|
||||
// Start the webpack build
|
||||
|
|
@ -148,7 +150,7 @@ function build(previousFileSizes) {
|
|||
function copyPublicFolder() {
|
||||
fs.copySync(paths.appPublic, paths.appBuild, {
|
||||
dereference: true,
|
||||
filter: file => file !== paths.appHtml,
|
||||
filter: file => file !== paths.appHtml && file !== paths.appPng,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue