Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed path alias.

Mike Cao51014f6ce62e
diff --git a/jsconfig.json b/jsconfig.json
index 738e8a465..f8124a205 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -1,5 +1,8 @@
{
"compilerOptions": {
- "baseUrl": "./src"
+ "baseUrl": "./src",
+ "paths": {
+ "public/*": ["./public/*"]
+ }
}
}
diff --git a/src/components/hooks/useCountryNames.js b/src/components/hooks/useCountryNames.js
index cd46ee442..51cabf34c 100644
--- a/src/components/hooks/useCountryNames.js
+++ b/src/components/hooks/useCountryNames.js
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { httpGet } from 'next-basics';
-import enUS from '../../../public/intl/country/en-US.json';
+import enUS from 'public/intl/country/en-US.json';
const countryNames = {
'en-US': enUS,
diff --git a/src/components/hooks/useLanguageNames.js b/src/components/hooks/useLanguageNames.js
index b684667a8..afcb0ba65 100644
--- a/src/components/hooks/useLanguageNames.js
+++ b/src/components/hooks/useLanguageNames.js
@@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { httpGet } from 'next-basics';
-import enUS from '../../../public/intl/country/en-US.json';
+import enUS from 'public/intl/country/en-US.json';
const languageNames = {
'en-US': enUS,
diff --git a/src/components/hooks/useLocale.js b/src/components/hooks/useLocale.js
index d84e1b4bb..1374af81f 100644
--- a/src/components/hooks/useLocale.js
+++ b/src/components/hooks/useLocale.js
@@ -5,7 +5,7 @@ import { LOCALE_CONFIG } from 'lib/constants';
import { getDateLocale, getTextDirection } from 'lib/lang';
import useStore, { setLocale } from 'store/app';
import useForceUpdate from 'components/hooks/useForceUpdate';
-import enUS from '../../../public/intl/country/en-US.json';
+import enUS from 'public/intl/country/en-US.json';
const messages = {
'en-US': enUS,
diff --git a/src/components/metrics/RegionsTable.js b/src/components/metrics/RegionsTable.js
index eee57a147..2e260e41d 100644
--- a/src/components/metrics/RegionsTable.js
+++ b/src/components/metrics/RegionsTable.js
@@ -5,7 +5,7 @@ import useLocale from 'components/hooks/useLocale';
import useMessages from 'components/hooks/useMessages';
import useCountryNames from 'components/hooks/useCountryNames';
import MetricsTable from './MetricsTable';
-import regions from '../../../public/iso-3166-2.json';
+import regions from 'public/iso-3166-2.json';
export function RegionsTable({ websiteId, ...props }) {
const { locale } = useLocale();