Skip to content

Commit

Permalink
Configure webpack for local development
Browse files Browse the repository at this point in the history
Signed-off-by: MeastroZI <vinitsharma2480@gmail.com>
  • Loading branch information
MeastroZI committed Mar 20, 2024
1 parent 2e272b1 commit 7893bf6
Show file tree
Hide file tree
Showing 5 changed files with 3,006 additions and 5,872 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ INSTALL ?= install
SASSC ?= sassc
MKDIR ?= mkdir
CONVERT ?= convert

WEBPACK_DEV_SERVER := ./node_modules/webpack-dev-server/bin/webpack-dev-server.js
WEBPACK_CONFIG := ./www/webpack.config.dev.js
WEBPACK_PORT := 8080
node_modules: package.json package-lock.json
$(NPM) ci

Expand Down Expand Up @@ -59,7 +61,7 @@ dist/favicon.ico: dist/icon-32x32.png | dist
dist/main.css: www/main.scss node_modules | dist
$(SASSC) --style compressed $< $@
dist/main.js: www/app.js node_modules | dist
$(NODE) $(word 2,$^)/webpack/bin/webpack.js --mode=production ./$< -o $(dir $@)
$(NODE) $(word 2,$^)/webpack/bin/webpack.js--mode=production ./$< -o $(dir $@)
dist/%: www/% | dist
$(INSTALL) -m 0664 $< $@

Expand All @@ -75,3 +77,6 @@ www: \
dist/apple-touch-icon.png \
dist/index.html \
dist/manifest.webmanifest
.PHONY: serve
serve: node_modules
$(NODE ) ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --config $(WEBPACK_CONFIG) --open --port $(WEBPACK_PORT)
Loading

0 comments on commit 7893bf6

Please sign in to comment.