Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/main' into multi-life-event-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-englander committed Feb 28, 2023
2 parents 91c077b + a7c29bd commit b0e9255
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .env.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## To use this file, rename this to .env which is already ignored by git.

## Enable console.log for your local dev environment.
VUE_APP_CONSOLE_LOG=true
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
semi: ["off"],
quotes: ["off"],
indent: ["off"],
"no-console": 0,
"jsx-a11y/click-events-have-key": "off",
"padded-blocks": ["off"],
"vue/singleline-html-element-content-newline": 0,
Expand Down
9 changes: 9 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ export default {
config.output.publicPath = sitePrefix
}
},
terser: {
// https://github.com/terser/terser#compress-options
// Exclude console.logs from prod builds. ( drop_console: true).
terserOptions: {
compress: {
drop_console: true,
},
},
},
},

generate: {
Expand Down
10 changes: 9 additions & 1 deletion plugins/axe.client.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import Vue from "vue"

export default function () {
const VueAxe = require("vue-axe").default
// If env file is present.
if (process.env.VUE_APP_CONSOLE_LOG) {
Vue.use(VueAxe, {
// Allow console.log on local.
allowConsoleClears: false,
})
}

if (process.env.NODE_ENV === "development") {
const VueAxe = require("vue-axe").default
Vue.use(VueAxe)
}
}

0 comments on commit b0e9255

Please sign in to comment.