[chore] Add dev script for easier development loop (#16)

This PR adds a npm "dev" script. Upon executing `npm run dev`, the project will be served (default port 3035) in "watch" mode, every local change of the files will refresh the page.

This change should enable faster development loop.

Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/16
Co-authored-by: Thiago 'Jedi' Cerqueira <thiagoa7@gmail.com>
Co-committed-by: Thiago 'Jedi' Cerqueira <thiagoa7@gmail.com>
This commit is contained in:
Thiago 'Jedi' Cerqueira
2025-03-13 13:28:26 +00:00
committed by tobi
parent 84718945c6
commit 0f77cb593c
2 changed files with 2 additions and 1 deletions

View File

@@ -36,7 +36,7 @@ module.exports = merge(sharedConfig, {
port: settings.dev_server.port, port: settings.dev_server.port,
https: settings.dev_server.https, https: settings.dev_server.https,
hot: settings.dev_server.hmr, hot: settings.dev_server.hmr,
contentBase: output.path, contentBase: settings.public_root_path,
inline: settings.dev_server.inline, inline: settings.dev_server.inline,
useLocalIp: settings.dev_server.use_local_ip, useLocalIp: settings.dev_server.use_local_ip,
public: settings.dev_server.public, public: settings.dev_server.public,

View File

@@ -5,6 +5,7 @@
"node": ">=16" "node": ">=16"
}, },
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --config config/webpack/development.js",
"build:development": "cross-env NODE_ENV=development webpack --config config/webpack/development.js", "build:development": "cross-env NODE_ENV=development webpack --config config/webpack/development.js",
"build:production": "cross-env NODE_ENV=production webpack --config config/webpack/production.js", "build:production": "cross-env NODE_ENV=production webpack --config config/webpack/production.js",
"build": "cross-env NODE_ENV=production webpack --config config/webpack/production.js", "build": "cross-env NODE_ENV=production webpack --config config/webpack/production.js",