diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2ef0bf5..1ff8163 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -6,5 +6,8 @@ module.exports = { extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-prettier'], env: { 'vue/setup-compiler-macros': true + }, + rules: { + 'vue/multi-word-component-names': 'off' } } diff --git a/Dockerfile b/Dockerfile index f304fa7..bb81005 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM node:16-slim WORKDIR /app COPY package*.json ./ -RUN npm install +RUN npm ci COPY . . -RUN npm run build --modern +RUN npm run build CMD ["node", "server"] \ No newline at end of file diff --git a/src/components/Chart.vue b/src/components/Chart.vue index a9a24a5..49bd15f 100644 --- a/src/components/Chart.vue +++ b/src/components/Chart.vue @@ -37,7 +37,8 @@ export default { try { const [start, end] = [window.value.getStart(), window.value.getEnd()] const sample = Math.round((end - start) / 60 / 288) || 1 - const host = process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : '' + console.log(import.meta.env.MODE) + const host = import.meta.env.MODE === 'development' ? 'http://localhost:3000' : '' const fetchUrl = `${host}/type/${typeApi[type.value]}/startDate/${start}/endDate/${end}/sample/${sample}` const response = await fetch(fetchUrl) data.value = await response.json() diff --git a/src/components/Main.vue b/src/components/Main.vue index c52f7b2..01be87f 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -27,7 +27,6 @@ export default { const currentRoute = router.currentRoute if (currentRoute.value.params.type) type.value = currentRoute.value.params.type if (currentRoute.value.params.window) window.value = { label: currentRoute.value.params.window } - console.log(type.value, window.value) const updateRoute = () => { if (type.value) { const route = {