Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add BASE_URL to dev startup, open deeply nested urls #589

Merged
merged 3 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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