Skip to content

Commit e276cf1

Browse files
committed
Fix minification Parcel error
1 parent 60b571b commit e276cf1

File tree

3 files changed

+7
-47
lines changed

3 files changed

+7
-47
lines changed

site/frontend/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ It uses a custom backend for transpiling `TypeScript`, which transpiles for brow
2626
the `browserslist` attribute in `package.json`. It does not perform type-checking, that is why
2727
there is a dedicated `npm run check` action that uses `tsc`. It is performed on CI to find typ errors.
2828
The `tsconfig.json` file is only used by the type-checking action.
29+
30+
The `buffer` alias in `package.json` is used to deter Parcel from providing `buffer` module
31+
polyfill. This polyfill breaks the minidifed JS Parcel output (at least in Parcel `2.8.3`).

site/frontend/package-lock.json

Lines changed: 0 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/frontend/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@parcel/transformer-vue": "^2.8.3",
1515
"@types/highcharts": "^7.0.0",
1616
"@types/msgpack-lite": "^0.1.8",
17-
"buffer": "^5.7.1",
1817
"typescript": "^5.0.2"
1918
},
2019
"dependencies": {
@@ -52,5 +51,8 @@
5251
"distDir": "dist/styles"
5352
}
5453
},
55-
"browserslist": "> 0.5%, last 3 years, not dead"
54+
"browserslist": "> 0.5%, last 3 years, not dead",
55+
"alias": {
56+
"buffer": false
57+
}
5658
}

0 commit comments

Comments
 (0)