Browse Source

fix: webpack issue

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
9308332706
  1. 13
      build-local-docker-image.sh

13
build-local-docker-image.sh

@ -29,7 +29,7 @@ function install_dependencies() {
pnpm i || ERROR="install_dependencies failed"
}
function build_gui(){
function build_gui() {
# build nc-gui
export NODE_OPTIONS="--max_old_space_size=16384"
# generate static build of nc-gui
@ -37,24 +37,23 @@ function build_gui(){
pnpm run generate || ERROR="gui build failed"
}
function copy_gui_artifacts(){
function copy_gui_artifacts() {
# copy nc-gui build to nocodb dir
rsync -rvzh --delete ./dist/ ${SCRIPT_DIR}/packages/nocodb/docker/nc-gui/ || ERROR="copy_gui_artifacts failed"
}
function package_nocodb(){
#build nocodb
function package_nocodb() {
# build nocodb ( pack nocodb-sdk and nc-gui )
cd ${SCRIPT_DIR}/packages/nocodb
EE=true ./node_modules/.bin/webpack --config webpack.local.config.js || ERROR="package_nocodb failed"
EE=true ${SCRIPT_DIR}/node_modules/.bin/webpack --config ${SCRIPT_DIR}/packages/nocodb/webpack.local.config.js || ERROR="package_nocodb failed"
}
function build_image(){
function build_image() {
# build docker
docker build . -f Dockerfile.local -t nocodb-local || ERROR="build_image failed"
}
function log_message(){
function log_message() {
if [[ ${ERROR} != "" ]];
then
>&2 echo "build failed, Please check build-local-docker-image.log for more details"

Loading…
Cancel
Save