Files
msw-open-music/web/build.sh
heimoshuiyu ec0dad00ef Replace react with preact
reduce js file bundle to 20%
2022-12-04 20:17:59 +08:00

7 lines
332 B
Bash
Executable File

rm -rf build
cp -raf public build
./node_modules/.bin/esbuild src/index.jsx --bundle --outfile=build/msw-open-music.js --alias:react=preact/compat --alias:react-dom=preact/compat --minify --analyze
cat public/index.html | sed "s/%PUBLIC_URL%/$PUBLIC_URL/" > build/index.html
echo "Build done, output files under ./build directory"