Skip to content

Commit

Permalink
Use ESM syntax for webpack.config.js, switch transpiler to SWC
Browse files Browse the repository at this point in the history
  • Loading branch information
CL-Jeremy committed Aug 21, 2020
1 parent 394f247 commit 5c913da
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 914 deletions.
10 changes: 10 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript"
}
},
"module": {
"type": "commonjs"
}
}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ lint-backend: golangci-lint revive vet
.PHONY: watch-frontend
watch-frontend: node-check $(FOMANTIC_DEST) node_modules
rm -rf $(WEBPACK_DEST_ENTRIES)
NODE_ENV=development npx webpack --hide-modules --display-entrypoints=false --watch --progress
NODE_ENV=development npx webpack -r @swc/register --hide-modules --display-entrypoints=false --watch --progress

.PHONY: watch-backend
watch-backend: go-check
Expand Down Expand Up @@ -639,7 +639,7 @@ webpack: $(WEBPACK_DEST)

$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json | node_modules
rm -rf $(WEBPACK_DEST_ENTRIES)
npx webpack --hide-modules --display-entrypoints=false
npx webpack -r @swc/register --hide-modules --display-entrypoints=false
@touch $(WEBPACK_DEST)

.PHONY: svg
Expand Down
Loading

0 comments on commit 5c913da

Please sign in to comment.