Skip to content

Commit

Permalink
[desktop]: Migrate to esbuild. Fix #674
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagohm committed Oct 25, 2024
1 parent 03d0d2b commit 2775f5c
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 950 deletions.
19 changes: 6 additions & 13 deletions desktop/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,18 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"builder": "@angular-builders/custom-esbuild:application",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"browser": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"polyfills": ["src/polyfills.ts"],
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["node_modules/leaflet/dist/leaflet.css", "node_modules/primeng/resources/primeng.min.css", "node_modules/primeflex/primeflex.css", "node_modules/primeicons/primeicons.css", "src/styles.scss"],
"scripts": ["node_modules/chart.js/dist/chart.umd.js"],
"customWebpackConfig": {
"path": "./angular.webpack.js",
"replaceDuplicatePlugins": true
}
"plugins": ["node-polyfills.plugin.ts"]
},
"configurations": {
"dev": {
Expand All @@ -45,9 +42,7 @@
"sourceMap": true,
"namedChunks": false,
"aot": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false
"extractLicenses": true
},
"production": {
"optimization": true,
Expand All @@ -56,8 +51,6 @@
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -68,7 +61,7 @@
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"builder": "@angular-builders/custom-esbuild:dev-server",
"options": {
"buildTarget": "nebulosa:build"
},
Expand Down
31 changes: 0 additions & 31 deletions desktop/angular.webpack.js

This file was deleted.

10 changes: 5 additions & 5 deletions desktop/electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
"!package.json",
"!package-lock.json",
{
"from": "../dist",
"from": "../dist/browser",
"filter": ["**/*"]
}
],
"extraResources": ["api.jar"],
"win": {
"icon": "dist/assets/icons",
"icon": "dist/browser/assets/icons",
"target": ["portable"]
},
"portable": {
"splashImage": "dist/assets/images/splash.bmp"
"splashImage": "dist/browser/assets/images/splash.bmp"
},
"mac": {
"icon": "dist/assets/icons",
"icon": "dist/browser/assets/icons",
"target": ["dmg"]
},
"linux": {
"icon": "dist/assets/icons",
"icon": "dist/browser/assets/icons",
"category": "Science",
"target": ["AppImage", "deb", "rpm"]
},
Expand Down
3 changes: 3 additions & 0 deletions desktop/node-polyfills.plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { polyfillNode } from 'esbuild-plugin-polyfill-node'

export default polyfillNode()
Loading

0 comments on commit 2775f5c

Please sign in to comment.