diff --git a/Makefile b/Makefile
index a1fed22c5..f6e388bb0 100644
--- a/Makefile
+++ b/Makefile
@@ -14,8 +14,8 @@ FRONTEND_DIST = frontend/dist
FRONTEND_DEPS = \
$(FRONTEND_YARN_MODULES) \
frontend/package.json \
- frontend/vue.config.js \
- frontend/babel.config.js \
+ frontend/vite.config.js \
+ frontend/.eslintrc.js \
$(shell find frontend/fontello frontend/public frontend/src -type f)
BIN := listmonk
@@ -57,7 +57,7 @@ build-frontend: $(FRONTEND_DIST)
# Run the JS frontend server in dev mode.
.PHONY: run-frontend
run-frontend:
- export VUE_APP_VERSION="${VERSION}" && cd frontend && $(YARN) serve
+ export VUE_APP_VERSION="${VERSION}" && cd frontend && $(YARN) dev
# Run Go tests.
.PHONY: test
diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js
index 34c991ec5..ce9a9faf6 100644
--- a/frontend/.eslintrc.js
+++ b/frontend/.eslintrc.js
@@ -2,16 +2,29 @@ module.exports = {
root: true,
env: {
node: true,
+ // es2022: true,
},
+ plugins: ['vue'],
extends: [
+ 'eslint:recommended',
'plugin:vue/essential',
- '@vue/airbnb',
+ 'plugin:vue/strongly-recommended',
+ '@vue/eslint-config-airbnb',
],
- parserOptions: {
- parser: '@babel/eslint-parser',
- },
+ parser: 'vue-eslint-parser',
rules: {
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
+ 'class-methods-use-this': 'off',
+ 'vue/multi-word-component-names': 'off',
+ 'vue/quote-props': 'off',
+ 'vue/first-attribute-linebreak': 'off',
+ 'vue/no-child-content': 'off',
+ 'vue/max-attributes-per-line': 'off',
+ 'vue/html-indent': 'off',
+ 'vue/html-closing-bracket-newline': 'off',
+ 'vue/max-len': ['error', {
+ code: 200,
+ template: 200,
+ comments: 200,
+ }],
},
};
diff --git a/frontend/cypress/support/e2e.js b/frontend/cypress/support/e2e.js
index 41b3ae3f0..eae2eeb70 100644
--- a/frontend/cypress/support/e2e.js
+++ b/frontend/cypress/support/e2e.js
@@ -5,7 +5,7 @@ beforeEach(() => {
req.destroy();
});
- cy.intercept('GET', '/api/health/**', (req) => {
+ cy.intercept('GET', '/api/health', (req) => {
req.reply({});
});
});
diff --git a/frontend/index.html b/frontend/index.html
new file mode 100644
index 000000000..bcf87f48c
--- /dev/null
+++ b/frontend/index.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+ listmonk
+
+
+
+
+
+
+
+
+
diff --git a/frontend/jsconfig.json b/frontend/jsconfig.json
new file mode 100644
index 000000000..5a1f2d222
--- /dev/null
+++ b/frontend/jsconfig.json
@@ -0,0 +1,8 @@
+{
+ "compilerOptions": {
+ "paths": {
+ "@/*": ["./src/*"]
+ }
+ },
+ "exclude": ["node_modules", "dist"]
+}
diff --git a/frontend/package.json b/frontend/package.json
index 28c9b2769..dde70a167 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -3,45 +3,42 @@
"version": "0.1.0",
"private": true,
"scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build",
- "build-report": "vue-cli-service build --report",
- "lint": "vue-cli-service lint"
+ "dev": "vite",
+ "build": "vite build",
+ "serve": "vite preview",
+ "lint": "eslint --ext .js,.vue --ignore-path .gitignore src",
+ "prebuild": "eslint --ext .js,.vue --ignore-path .gitignore src"
},
"dependencies": {
"@tinymce/tinymce-vue": "^3",
- "axios": "^1.6.0",
- "buefy": "^0.9.10",
+ "axios": "^1.6.2",
+ "buefy": "^0.9.25",
+ "bulma": "^0.9.4",
"c3": "^0.7.20",
"codeflask": "^1.4.1",
- "core-js": "^3.12.1",
- "dayjs": "^1.10.4",
+ "dayjs": "^1.11.10",
"indent.js": "^0.3.5",
"qs": "^6.10.1",
"textversionjs": "^1.1.3",
"tinymce": "^5.10.9",
- "turndown": "^7.0.0",
- "vue": "^2.6.12",
- "vue-i18n": "^8.22.2",
+ "turndown": "^7.1.2",
+ "vue": "^2.7.14",
+ "vue-i18n": "^8.28.2",
"vue-router": "^3.2.0",
"vuex": "^3.6.2"
},
"devDependencies": {
- "@babel/core": "^7.23.3",
- "@babel/eslint-parser": "^7.23.3",
- "@vue/cli-plugin-babel": "~5.0.8",
- "@vue/cli-plugin-eslint": "~5.0.8",
- "@vue/cli-plugin-router": "~5.0.8",
- "@vue/cli-plugin-vuex": "~5.0.8",
- "@vue/cli-service": "~5.0.8",
- "@vue/eslint-config-airbnb": "^5.3.0",
+ "@vitejs/plugin-vue2": "^2.3.1",
+ "@vue/eslint-config-airbnb": "^7.0.1",
"cypress": "13.6.1",
"cypress-file-upload": "^5.0.2",
- "eslint": "^7.27.0",
+ "eslint": "^8.56.0",
+ "eslint-define-config": "^2.0.0",
"eslint-plugin-import": "^2.23.3",
- "eslint-plugin-vue": "^7.9.0",
+ "eslint-plugin-vue": "^9.19.2",
"sass": "^1.34.0",
- "sass-loader": "^10.2.0",
+ "vite": "^5.0.10",
+ "vue-eslint-parser": "^9.3.2",
"vue-template-compiler": "^2.6.12"
}
}
diff --git a/frontend/public/index.html b/frontend/public/index.html
deleted file mode 100644
index f4ea3078d..000000000
--- a/frontend/public/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
- <%= htmlWebpackPlugin.options.title %>
-
-
-
-
-
-
-
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 693da05a9..e03134fb8 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -1,37 +1,30 @@