@tomjs/vite-plugin-electron 1.3.4 → 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/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
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;
|