diff --git a/.env.production.lite b/.env.production.lite new file mode 100644 index 00000000..c58a53e1 --- /dev/null +++ b/.env.production.lite @@ -0,0 +1,4 @@ +NODE_ENV=production +VUE_APP_PLATFORM=web +VUE_APP_TARGET=web +VUE_APP_LITEMODE=true \ No newline at end of file diff --git a/.gitignore b/.gitignore index be92d222..2f59b8bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .DS_Store node_modules /dist +/dist-lite /app/dist /release-builds /installers/release-builds diff --git a/package.json b/package.json index 6ee545ce..57ec2795 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "main": "./app/app.js", "scripts": { "build:web": "vue-cli-service build --mode production.web", + "build:lite": "vue-cli-service build --mode production.lite", "build:app": "vue-cli-service build --mode production.app", "serve": "vue-cli-service serve --mode development.web", "start": "npm run build:app && electron app/app.js", diff --git a/src/App.vue b/src/App.vue index d97cd99e..c2a31018 100644 --- a/src/App.vue +++ b/src/App.vue @@ -61,6 +61,9 @@ export default { }, mounted() { + if (process.env.VUE_APP_LITEMODE == "true") { + console.log("Built lite-mode"); + } // Query CSS dark theme preference var mql = window.matchMedia("(prefers-color-scheme: dark)"); // Check for system dark theme when mounted diff --git a/vue.config.js b/vue.config.js index 57afe298..892aff82 100644 --- a/vue.config.js +++ b/vue.config.js @@ -20,7 +20,15 @@ module.exports = { }) ); }, - outputDir: - process.env.VUE_APP_TARGET == "electron-renderer" ? "./app/dist" : "./dist", + outputDir: (function() { + if (process.env.VUE_APP_TARGET == "electron-renderer") { + return "./app/dist"; + } else if (process.env.VUE_APP_LITEMODE == "true") { + return "./dist-lite"; + } else { + return "./dist"; + } + })(), + publicPath: "" };