Skip to content

Commit

Permalink
fix: purgeCSS from node_modules 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
rizkhal committed Apr 8, 2023
1 parent 7eef710 commit c5fa122
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 39 deletions.
77 changes: 40 additions & 37 deletions electron-builder.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
{
"appId": "com.electron.app",
"directories": {
"output": "dist"
"appId": "com.aniflix.app",
"directories": {
"output": "dist"
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"shortcutName": "AniFlix"
},
"win": {
"target": "nsis",
"icon": "build/renderer/aniflix512.png"
},
"linux": {
"target": ["deb"],
"category": "Video",
"icon": "build/renderer/aniflix512.png"
},
"files": [
"build/main/**/*",
{
"from": "build/renderer",
"to": "renderer",
"filter": ["**/*"]
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"shortcutName": "Electron App"
{
"from": "src/main/static",
"to": "static",
"filter": ["**/*"]
},
"win": {
"target": "nsis"
},
"linux": {
"target": ["snap"]
},
"files": [
"build/main/**/*",
{
"from": "build/renderer",
"to": "renderer",
"filter": ["**/*"]
},
{
"from": "src/main/static",
"to": "static",
"filter": ["**/*"]
},
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!src",
"!config",
"!README.md",
"!scripts",
"!build/renderer",
"!dist"
]
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!src",
"!config",
"!README.md",
"!scripts",
"!build/renderer",
"!dist"
]
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"build": "node scripts/build.js && electron-builder",
"build:win": "node scripts/build.js && electron-builder --win",
"build:mac": "node scripts/build.js && electron-builder --mac",
"build:linux": "node scripts/build.js && electron-builder --linux",
"build:linux-deb": "node scripts/build.js && electron-builder --linux deb"
"build:linux": "node scripts/build.js && electron-builder --linux"
},
"author": {
"name": "Rizkhal",
Expand Down
Binary file added src/renderer/public/aniflix256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/renderer/public/aniflix512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ const config = defineConfig({
build: {
outDir: Path.join(__dirname, "build", "renderer"),
emptyOutDir: true,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("node_modules")) {
return id
.toString()
.split("node_modules/")[1]
.split("/")[0]
.toString();
}
},
},
},
},
plugins: [svgLoader(), vuePlugin(), viteExtend(), envCompatible()],
});
Expand Down

0 comments on commit c5fa122

Please sign in to comment.