Skip to content

Commit

Permalink
Add build for vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
ngekoding committed Jan 17, 2024
1 parent 921f52e commit 131fe8a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint --ext .js,.vue ./",
"test": "echo \"No test specified\" && exit 0",
"dev": "NODE_OPTIONS=--openssl-legacy-provider && quasar dev -m pwa",
"build": "NODE_OPTIONS=--openssl-legacy-provider && quasar build -m pwa"
"build": "NODE_OPTIONS=--openssl-legacy-provider && quasar build -m pwa",
"build-vercel": "NODE_OPTIONS=--openssl-legacy-provider && PUBLIC_PATH=/ quasar build -m pwa"
},
"dependencies": {
"@quasar/extras": "^1.0.0",
Expand Down
44 changes: 22 additions & 22 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// https://quasar.dev/quasar-cli/quasar-conf-js
/* eslint-env node */

module.exports = function(ctx) {
module.exports = function (ctx) {
return {
// https://quasar.dev/quasar-cli/supporting-ts
supportTS: false,
Expand All @@ -34,17 +34,17 @@ module.exports = function(ctx) {
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!

"roboto-font", // optional, you are not bound to it
"material-icons" // optional, you are not bound to it
"material-icons", // optional, you are not bound to it
],

// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
build: {
vueRouterMode: "history", // available values: 'hash', 'history'
publicPath: ctx.dev ? "/" : "/quran-id/",
publicPath: ctx.dev ? "/" : process.env.PUBLIC_PATH ?? "/quran-id/",
// transpile: false,
env: {
QURAN_API_BASE_URL: "https://api.quran.com/api/v4/",
GTAG_ENABLED: ctx.prod
GTAG_ENABLED: ctx.prod,
},

// Add dependencies for transpiling with Babel (Array of string/regex)
Expand All @@ -67,16 +67,16 @@ module.exports = function(ctx) {
enforce: "pre",
test: /\.(js|vue)$/,
loader: "eslint-loader",
exclude: /node_modules/
exclude: /node_modules/,
});
}
},
},

// Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-devServer
devServer: {
https: false,
port: 8080,
open: true // opens browser window automatically
open: true, // opens browser window automatically
},

// https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework
Expand All @@ -98,7 +98,7 @@ module.exports = function(ctx) {
// directives: [],

// Quasar plugins
plugins: ["Notify", "LocalStorage", "Meta"]
plugins: ["Notify", "LocalStorage", "Meta"],
},

// animations: 'all', // --- includes all animations
Expand All @@ -107,15 +107,15 @@ module.exports = function(ctx) {

// https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr
ssr: {
pwa: false
pwa: false,
},

// https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxPluginMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest'
workboxOptions: {
skipWaiting: true,
clientsClaim: true
clientsClaim: true,
}, // only for GenerateSW
manifest: {
name: `Al-Quran`,
Expand All @@ -129,30 +129,30 @@ module.exports = function(ctx) {
{
src: "icons/icon-128x128.png",
sizes: "128x128",
type: "image/png"
type: "image/png",
},
{
src: "icons/icon-192x192.png",
sizes: "192x192",
type: "image/png"
type: "image/png",
},
{
src: "icons/icon-256x256.png",
sizes: "256x256",
type: "image/png"
type: "image/png",
},
{
src: "icons/icon-384x384.png",
sizes: "384x384",
type: "image/png"
type: "image/png",
},
{
src: "icons/icon-512x512.png",
sizes: "512x512",
type: "image/png"
}
]
}
type: "image/png",
},
],
},
},

// Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
Expand All @@ -162,7 +162,7 @@ module.exports = function(ctx) {

// Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
capacitor: {
hideSplashscreen: true
hideSplashscreen: true,
},

// Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
Expand All @@ -183,7 +183,7 @@ module.exports = function(ctx) {
builder: {
// https://www.electron.build/configuration/configuration

appId: "quran-id"
appId: "quran-id",
},

// More info: https://quasar.dev/quasar-cli/developing-electron-apps/node-integration
Expand All @@ -192,7 +192,7 @@ module.exports = function(ctx) {
extendWebpack(/* cfg */) {
// do something with Electron main process Webpack cfg
// chainWebpack also available besides this extendWebpack
}
}
},
},
};
};

0 comments on commit 131fe8a

Please sign in to comment.