From aa41b105c7c69fa905922053ea9112aefd65212c Mon Sep 17 00:00:00 2001 From: terwer Date: Wed, 10 May 2023 02:52:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20commonjs=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E9=94=99=E8=AF=AF=EF=BC=8C=E5=8F=96=E6=B6=88?= =?UTF-8?q?=20type=3Dmodule=20=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- tools/{changelogParser.ts => changelogParser.mts} | 0 vite.config.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename tools/{changelogParser.ts => changelogParser.mts} (100%) diff --git a/package.json b/package.json index 5540586..81ef941 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "sy-post-publisher", "private": true, "version": "0.8.0", - "type": "module", + "type": "commonjs", "scripts": { "serve": "python scripts/serve.py", "dev": "python scripts/dev.py", @@ -11,7 +11,7 @@ "test": "vitest --watch", "docs": "jsdoc -c jsdoc.json utils/api.ts", "syncVersion": "python scripts/version.py", - "parseChangelog": "ts-node-esm --experimental-specifier-resolution=node tools/changelogParser.ts", + "parseChangelog": "ts-node-esm --experimental-specifier-resolution=node tools/changelogParser.mts", "prepareRelease": "pnpm syncVersion && pnpm parseChangelog", "widget": "python scripts/widget.py", "ext": "python scripts/ext.py", diff --git a/tools/changelogParser.ts b/tools/changelogParser.mts similarity index 100% rename from tools/changelogParser.ts rename to tools/changelogParser.mts diff --git a/vite.config.ts b/vite.config.ts index 5a2f3fd..bf471d9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -159,6 +159,7 @@ export default defineConfig(({ command, mode, ssrBuild }) => { ], }), // https://github.com/WarrenJones/vite-plugin-require-transform/issues/10 + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore vitePluginRequireTransform({}), ],