From 2fea7fd994a1d2d36e90bc9df1d61f75d8285855 Mon Sep 17 00:00:00 2001 From: Ratmir Tsaregorodtsev Date: Fri, 22 Sep 2023 19:26:29 +0300 Subject: [PATCH] Fix eslint --- .eslintignore | 1 + vite-plugin-handlebars-precompile.js | 24 ------------------------ vite.config.js | 2 -- 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 vite-plugin-handlebars-precompile.js diff --git a/.eslintignore b/.eslintignore index 95651cacd..88d3b20d9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ /dist /node_modules *.ts +*.json diff --git a/vite-plugin-handlebars-precompile.js b/vite-plugin-handlebars-precompile.js deleted file mode 100644 index a90219430..000000000 --- a/vite-plugin-handlebars-precompile.js +++ /dev/null @@ -1,24 +0,0 @@ -import Handlebars from "handlebars"; - -export default function handlebars() { - const fileRegexp = /\.hbs$|\.handlebars$/; - - return { - name: "vite-plugin-handlebars-precompile", - transform(src, id) { - if (!fileRegexp.test(id)) { - return; - } - - const code = ` - import Handlebars from 'handlebars/runtime'; - - export default Handlebars.template(${Handlebars.precompile(src)}); - `; - - return { - code, - }; - }, - }; -} diff --git a/vite.config.js b/vite.config.js index 28ce976fc..71a6df9ff 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,5 @@ import { resolve, parse } from "path"; import { defineConfig } from "vite"; -import handlebars from "./vite-plugin-handlebars-precompile"; export default defineConfig({ root: resolve(__dirname, "src"), @@ -21,7 +20,6 @@ export default defineConfig({ }, }, }, - plugins: [handlebars()], resolve: { alias: { "@": resolve("./src"),