Skip to content

Commit

Permalink
#VFB-181 - Replace minify preset with minification plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmartin committed Jan 18, 2025
1 parent c5e9b08 commit 535813f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions applications/virtual-fly-brain/client/.babelrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
"@babel/preset-env",
"@babel/preset-react"
],
"env": {
"production":{
"presets": ["minify"]
"production": {
// Remove the minify preset and add individual minification plugins
"plugins": [
"babel-plugin-transform-remove-console", // Remove console logs
"babel-plugin-minify-dead-code-elimination", // Remove dead code
"babel-plugin-minify-constant-folding", // Fold constants
"babel-plugin-transform-remove-debugger" // Remove debugger statements
]
}
},
"plugins": [
"@babel/transform-regenerator",
"@babel/plugin-proposal-class-properties",
"@babel/transform-runtime",
[
"module-resolver", {
"module-resolver",
{
"root": ["./src"]
}
]
Expand Down
2 changes: 1 addition & 1 deletion applications/virtual-fly-brain/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@
"@babel/preset-env": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"@babel/runtime": "^7.8.3",
"babel-loader": "^8.2.3",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"awesome-typescript-loader": "^5.2.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.0.6",
"babel-plugin-module-resolver": "^4.0.0",
"babel-preset-minify": "^0.5.1",
"clean-webpack-plugin": "^3.0.0",
Expand Down

0 comments on commit 535813f

Please sign in to comment.