summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/core/build/static-build.ts7
-rw-r--r--packages/astro/test/custom-assets-name.test.js2
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts
index b99890b82..1ef57d787 100644
--- a/packages/astro/src/core/build/static-build.ts
+++ b/packages/astro/src/core/build/static-build.ts
@@ -385,15 +385,14 @@ async function ssrMoveAssets(opts: StaticBuildOptions) {
});
if (files.length > 0) {
-
await Promise.all(
files.map(async (filename) => {
const currentUrl = new URL(filename, appendForwardSlash(serverAssets.toString()));
const clientUrl = new URL(filename, appendForwardSlash(clientAssets.toString()));
- const dir = new URL(path.parse(clientUrl.href).dir)
- // It can't find this file because the user defines a custom path
+ const dir = new URL(path.parse(clientUrl.href).dir);
+ // It can't find this file because the user defines a custom path
// that includes the folder paths in `assetFileNames
- if(!fs.existsSync(dir)) await fs.promises.mkdir(dir, { recursive: true });
+ if (!fs.existsSync(dir)) await fs.promises.mkdir(dir, { recursive: true });
return fs.promises.rename(currentUrl, clientUrl);
})
);
diff --git a/packages/astro/test/custom-assets-name.test.js b/packages/astro/test/custom-assets-name.test.js
index 345a9d2a7..c44116921 100644
--- a/packages/astro/test/custom-assets-name.test.js
+++ b/packages/astro/test/custom-assets-name.test.js
@@ -14,7 +14,7 @@ describe('custom the assets name function', () => {
});
it('It cant find this file cause the node throws an error if the users custom a path that includes the folder path', async () => {
- const csslength = await fixture.readFile('client/assets/css/a.css')
+ const csslength = await fixture.readFile('client/assets/css/a.css');
/** @type {Set<string>} */
expect(!!csslength).to.equal(true);
});