@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 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 ??= "inline";
232
- opts.preload.sourcemap ??= "inline";
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 ??= "inline";
231
- opts.preload.sourcemap ??= "inline";
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomjs/vite-plugin-electron",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "A simple vite plugin for electron, supports esm/cjs, support esm in electron v28+",
5
5
  "keywords": [
6
6
  "vite",