Skip to content

Commit

Permalink
fix: add BASE_URL to dev startup, open deeply nested urls (#589)
Browse files Browse the repository at this point in the history
* fix: add BASE_URL to dev startup, open deeply nested urls

Signed-off-by: Carina Ursu <[email protected]>

* fix: remove debug code

Signed-off-by: Carina Ursu <[email protected]>

* chore: empty BASE_URL handling

Signed-off-by: Carina Ursu <[email protected]>

Signed-off-by: Carina Ursu <[email protected]>
  • Loading branch information
ursucarina authored Sep 13, 2022
1 parent 9a1ae4c commit a5cad5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/zapp/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"clean": "rm -rf dist",
"build": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' webpack --config webpack.dev.config.ts --mode=development",
"build:prod": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' NODE_ENV=production webpack --config webpack.prod.config.ts --mode=production --progress",
"start": "webpack serve --open --config webpack.dev.config.ts --hot",
"start": "webpack serve --config webpack.dev.config.ts --hot",
"start:prod": "NODE_ENV=production node -r dotenv/config index.js",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"format": "prettier --ignore-path .eslintignore --write \"**/*.+(js|jsx|ts|tsx|json)\"",
Expand Down
7 changes: 6 additions & 1 deletion packages/zapp/console/webpack.dev.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
CERTIFICATE_PATH,
ADMIN_API_USE_SSL,
ASSETS_PATH as publicPath,
BASE_URL,
} from './env';

const { merge } = require('webpack-merge');
Expand Down Expand Up @@ -41,7 +42,11 @@ export const clientConfig: webpack.Configuration = merge(common.default.clientCo
devtool,
devServer: {
hot: true,
static: path.join(__dirname, 'dist'),
open: [BASE_URL || '/'],
static: {
directory: path.join(__dirname, 'dist'),
publicPath,
},
compress: true,
port: 3000,
host: LOCAL_DEV_HOST,
Expand Down

0 comments on commit a5cad5d

Please sign in to comment.