From 424a06c0b0bd31fa36019d351d7d3423cb79efa6 Mon Sep 17 00:00:00 2001 From: Soner Sayakci Date: Sun, 3 Mar 2024 14:09:56 +0100 Subject: [PATCH] fix: revert subfolder for js assets --- internal/esbuild/esbuild.go | 2 +- internal/esbuild/esbuild_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/esbuild/esbuild.go b/internal/esbuild/esbuild.go index 934ae6d4..a44ff083 100644 --- a/internal/esbuild/esbuild.go +++ b/internal/esbuild/esbuild.go @@ -52,7 +52,7 @@ func NewAssetCompileOptionsStorefront(name, path string) AssetCompileOptions { EntrypointDir: "Resources/app/storefront/src", OutputDir: "Resources/app/storefront/dist/storefront", ProductionMode: true, - OutputJSFile: filepath.Join("js", kebabCased, kebabCased+".js"), + OutputJSFile: filepath.Join("js", kebabCased+".js"), OutputCSSFile: filepath.Join("css", kebabCased+".css"), // We never emit CSS for the storefront, they are always lying in a separate SCSS file entrypoint DisableSass: true, diff --git a/internal/esbuild/esbuild_test.go b/internal/esbuild/esbuild_test.go index 595e69e5..d380bb68 100644 --- a/internal/esbuild/esbuild_test.go +++ b/internal/esbuild/esbuild_test.go @@ -109,7 +109,7 @@ func TestESBuildStorefront(t *testing.T) { assert.NoError(t, err) - compiledFilePath := path.Join(dir, "Resources", "app", "storefront", "dist", "storefront", "js", "bla", "bla.js") + compiledFilePath := path.Join(dir, "Resources", "app", "storefront", "dist", "storefront", "js", "bla.js") _, err = os.Stat(compiledFilePath) assert.NoError(t, err) }