From 5f544576ff2badd89d9c19d116e291ec770d603e Mon Sep 17 00:00:00 2001 From: RobertGemmaJr Date: Mon, 5 Aug 2024 10:58:20 -0400 Subject: [PATCH] chore: comments --- src/App/App.jsx | 8 -------- vite.main.config.js | 1 - vite.preload.config.js | 8 +++++--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/App/App.jsx b/src/App/App.jsx index 08896b73..514ab420 100644 --- a/src/App/App.jsx +++ b/src/App/App.jsx @@ -52,14 +52,6 @@ export default function App() { "Task Settings": SETTINGS, }); - // TEMP: Testing to ensure the config is setup correctly - console.log( - "ENVIRONMENT", - import.meta.env.PACKAGE_NAME, - import.meta.env.PACKAGE_VERSION, - import.meta.env - ); - // If on desktop if (CONFIG.USE_ELECTRON) { // TODO @brown-ccv #443 : Pass NODE_ENV here as well diff --git a/vite.main.config.js b/vite.main.config.js index c5bd195d..4ee74fe2 100644 --- a/vite.main.config.js +++ b/vite.main.config.js @@ -8,7 +8,6 @@ export default defineConfig((env) => lib: { entry: env.forgeConfigSelf.entry, fileName: () => "[name].js", - // formats: ["cjs"], formats: ["es"], }, rollupOptions: { external }, diff --git a/vite.preload.config.js b/vite.preload.config.js index 58236819..773b0005 100644 --- a/vite.preload.config.js +++ b/vite.preload.config.js @@ -10,12 +10,14 @@ export default defineConfig((env) => // Preload scripts may contain Web assets, so use the `build.rollupOptions.input` instead `build.lib.entry`. input: env.forgeConfigSelf.entry, output: { - // format: "cjs", // TODO: Switch to ESM modules format: "es", // It should not be split chunks. inlineDynamicImports: true, - entryFileNames: "[name].js", - chunkFileNames: "[name].js", + // NOTE: The preload script must be built with the .mjs extensions: https://www.electronjs.org/docs/latest/tutorial/esm#esm-preload-scripts-must-have-the-mjs-extension + // entryFileNames: "[name].js", + // chunkFileNames: "[name].js", + entryFileNames: "[name].mjs", + chunkFileNames: "[name].mjs", assetFileNames: "[name].[ext]", }, },