diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..047a48d --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +NODE_ENV=development +VUE_APP_TITLE="v-b-s dev" diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..cbde1cc --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +NODE_ENV=production diff --git a/public/index.html b/public/index.html index 0d92455..d8deb1d 100644 --- a/public/index.html +++ b/public/index.html @@ -4,12 +4,9 @@ - Vue Box-shadows + <%= VUE_APP_TITLE %> ยท <%= VUE_APP_VERSION %> -
- Collection of CSS box-shadows for every taste contains more than 100 - simple, beautiful and airy shadows. -
+
<%= VUE_APP_DESCRIPTION %>
diff --git a/vue.config.js b/vue.config.js new file mode 100644 index 0000000..f26f8a3 --- /dev/null +++ b/vue.config.js @@ -0,0 +1,24 @@ +const { defineConfig } = require("@vue/cli-service"); +const path = require("path"); + +process.env.VUE_APP_VERSION = require("./package.json").version; +process.env.VUE_APP_DESCRIPTION = require("./package.json").description; + +module.exports = defineConfig({ + lintOnSave: true, + devServer: { + port: 8080, + }, + chainWebpack: (config) => { + config.resolve.alias.set("@", path.resolve(__dirname, "src/")); + if (process.env.NODE_ENV == "production") { + VUE_APP_TITLE = require("./package.json").name; + // } else { + } + }, + outputDir: path.resolve( + __dirname, + process.env.NODE_ENV === "production" ? "dist/" : "/" + ), + productionSourceMap: false, +});