If there are multiple projects using this boilerplate locally, running pnpm start will always start the webpack-dev-server for the first project. How can I modify this? I don't know how to write webpack configurations.
this?
"scripts": { "start": "webpack-dev-server", "build": "cross-env NODE_ENV=production webpack", "build:dev": "cross-env NODE_ENV=development webpack-cli", "serve": "serve -p 8888 dist", "serve:dev": "pnpm build:dev && pnpm serve", "serve:prod": "pnpm build && pnpm serve" },
or this?
devServer: { static: { directory: DIST_DIR, // must be the same as output.path }, watchFiles: { paths: ['src/**/*.*'], }, port: 8888, },
If there are multiple projects using this boilerplate locally, running
pnpm startwill always start the webpack-dev-server for the first project. How can I modify this? I don't know how to write webpack configurations.this?
"scripts": { "start": "webpack-dev-server", "build": "cross-env NODE_ENV=production webpack", "build:dev": "cross-env NODE_ENV=development webpack-cli", "serve": "serve -p 8888 dist", "serve:dev": "pnpm build:dev && pnpm serve", "serve:prod": "pnpm build && pnpm serve" },or this?
devServer: { static: { directory: DIST_DIR, // must be the same as output.path }, watchFiles: { paths: ['src/**/*.*'], }, port: 8888, },