@tomjs/vite-plugin-electron 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh_CN.md +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -291,4 +291,4 @@ Run `Debug Main Process` through `vscode` to debug the main thread. For debuggin
|
|
|
291
291
|
|
|
292
292
|
**Notice**
|
|
293
293
|
|
|
294
|
-
Although `Electron v28` supports `esm`, `VSCode Debug` breakpoints
|
|
294
|
+
Although `Electron v28` supports `esm`, there may be problems with `VSCode Debug` sourcemap support and breakpoints cannot work properly. In this case, you can consider using `cjs` mode.
|
package/README.zh_CN.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -166,6 +166,7 @@ function preMergeOptions(options) {
|
|
|
166
166
|
const pkg = getPkg();
|
|
167
167
|
const format = pkg.type === "module" ? "esm" : "cjs";
|
|
168
168
|
const electron2 = {
|
|
169
|
+
target: ["es2021", "node16"],
|
|
169
170
|
format,
|
|
170
171
|
clean: true,
|
|
171
172
|
dts: false,
|
|
@@ -228,8 +229,8 @@ function vitePluginElectron(options) {
|
|
|
228
229
|
opts.preload.outDir ||= _path2.default.join("dist-electron", "preload");
|
|
229
230
|
}
|
|
230
231
|
if (isDev) {
|
|
231
|
-
opts.main.sourcemap ??=
|
|
232
|
-
opts.preload.sourcemap ??=
|
|
232
|
+
opts.main.sourcemap ??= true;
|
|
233
|
+
opts.preload.sourcemap ??= true;
|
|
233
234
|
} else {
|
|
234
235
|
opts.main.minify ??= true;
|
|
235
236
|
opts.preload.minify ??= true;
|
package/dist/index.mjs
CHANGED
|
@@ -165,6 +165,7 @@ function preMergeOptions(options) {
|
|
|
165
165
|
const pkg = getPkg();
|
|
166
166
|
const format = pkg.type === "module" ? "esm" : "cjs";
|
|
167
167
|
const electron2 = {
|
|
168
|
+
target: ["es2021", "node16"],
|
|
168
169
|
format,
|
|
169
170
|
clean: true,
|
|
170
171
|
dts: false,
|
|
@@ -227,8 +228,8 @@ function vitePluginElectron(options) {
|
|
|
227
228
|
opts.preload.outDir ||= path.join("dist-electron", "preload");
|
|
228
229
|
}
|
|
229
230
|
if (isDev) {
|
|
230
|
-
opts.main.sourcemap ??=
|
|
231
|
-
opts.preload.sourcemap ??=
|
|
231
|
+
opts.main.sourcemap ??= true;
|
|
232
|
+
opts.preload.sourcemap ??= true;
|
|
232
233
|
} else {
|
|
233
234
|
opts.main.minify ??= true;
|
|
234
235
|
opts.preload.minify ??= true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomjs/vite-plugin-electron",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "A simple vite plugin for electron, supports esm/cjs
|
|
3
|
+
"version": "1.3.5",
|
|
4
|
+
"description": "A simple vite plugin for electron, supports esm/cjs, support esm in electron v28+",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
7
7
|
"plugin",
|