Skip to content

Commit df89c15

Browse files
committed
feat: Support for cjs is restored
1 parent 11cece4 commit df89c15

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/vite-plugin/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@plugin-web-update-notification/vite",
33
"type": "module",
4-
"version": "1.8.0",
4+
"version": "1.8.1",
55
"description": "Vite plugin for detect web page updates and notify.",
66
"author": "Utopia",
77
"license": "MIT",
@@ -24,11 +24,11 @@
2424
"exports": {
2525
".": {
2626
"types": "./dist/index.d.ts",
27-
"import": "./dist/index.js",
28-
"default": "./dist/index.js"
27+
"require": "./dist/index.cjs",
28+
"import": "./dist/index.js"
2929
}
3030
},
31-
"main": "dist/index.js",
31+
"main": "dist/index.cjs",
3232
"module": "dist/index.js",
3333
"types": "dist/index.d.ts",
3434
"files": [

packages/vite-plugin/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default defineConfig((options) => { // The options here is derived from C
1111
sourcemap: true,
1212
clean: true,
1313
dts: true,
14-
format: ['esm'],
14+
format: ['cjs', 'esm'],
1515
minify: !options.watch,
1616
// after bundle success, run script, copy inject file from @plugin-web-update-notification/core
1717
onSuccess: `node ${resolve('node_modules', pkgName, 'dist', 'pluginBuildScript.js')}`,

0 commit comments

Comments
 (0)