Skip to content

Commit 2d32cfa

Browse files
committed
add "build-web" script
1 parent 5162b85 commit 2d32cfa

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"proxy": "https://api.hackertab.dev/",
4444
"scripts": {
4545
"start": "craco start",
46-
"build-web": "craco --max_old_space_size=4096 build",
46+
"build-web": "./script/build-web.sh",
4747
"build": "./script/build.sh",
4848
"build-firefox": "./script/build-firefox.sh",
4949
"build-chrome": "./script/build-chrome.sh",

script/build-web.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
build() {
4+
echo 'building app for web'
5+
6+
export INLINE_RUNTIME_CHUNK=false
7+
export GENERATE_SOURCEMAP=false
8+
9+
craco --max_old_space_size=4096 build
10+
11+
rm -rf dist
12+
mkdir -p dist
13+
cp -r build/* dist/
14+
}
15+
16+
build

0 commit comments

Comments
 (0)