From 4f7a64342055be53563782d4fd2d75e031c7f2a8 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Mon, 18 Nov 2024 10:15:23 -0500 Subject: [PATCH] Module active jobs (#3957) import active_jobs js as a module and add the ability to minify js in dev environment. --- apps/dashboard/app/views/active_jobs/index.html.erb | 2 +- apps/dashboard/esbuild.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/app/views/active_jobs/index.html.erb b/apps/dashboard/app/views/active_jobs/index.html.erb index 5264bec5fa..72490ccec4 100644 --- a/apps/dashboard/app/views/active_jobs/index.html.erb +++ b/apps/dashboard/app/views/active_jobs/index.html.erb @@ -68,4 +68,4 @@ > -<%= javascript_include_tag 'active_jobs', nonce: true %> \ No newline at end of file +<%= javascript_include_tag 'active_jobs', nonce: true, type: 'module' %> diff --git a/apps/dashboard/esbuild.config.js b/apps/dashboard/esbuild.config.js index a216f79fb5..bd7b626b62 100644 --- a/apps/dashboard/esbuild.config.js +++ b/apps/dashboard/esbuild.config.js @@ -73,7 +73,7 @@ esbuild.build({ outdir: buildDir, external: ['fs'], plugins: [prepPlugin, minifiedSrcResolvePlugin], - minify: process.env.RAILS_ENV == 'production' ? true : false, + minify: process.env.RAILS_ENV == 'production' || process.env.MINIFY == 'false' ? true : false, }).catch((e) => { console.error(e.message); process.exit(1);