Skip to content

Commit 89dc2cd

Browse files
committed
revert: revert "build: see if not touching esbuild options helps"
This reverts commit baf0850.
1 parent baf0850 commit 89dc2cd

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

website/src/lib/unified/bundle.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,22 @@ export const bundle = async <Frontmatter>({ source, cwd, baseUrl, slug }: Option
5757

5858
return options
5959
},
60-
// esbuildOptions: (options) => {
61-
// options.loader = {
62-
// ...(options.loader ?? {}),
63-
// ".png": 'file',
64-
// ".jpg": 'file',
65-
// ".gif": 'file',
66-
// }
60+
esbuildOptions: (options) => {
61+
options.loader = {
62+
...(options.loader ?? {}),
63+
".png": 'file',
64+
".jpg": 'file',
65+
".gif": 'file',
66+
}
6767

68-
// // write assets locally to `~/public/static/content/[...slug]`,
69-
// // and they will correspondingly be served at /static/content/[...slug]
70-
// options.outdir = slug ? path.join(process.cwd(), 'public', 'static', 'content', ...slug) : undefined
71-
// options.publicPath = slug ? `/static/content${baseUrl}/${slug.join('/')}` : undefined
72-
// options.write = true
68+
// write assets locally to `~/public/static/content/[...slug]`,
69+
// and they will correspondingly be served at /static/content/[...slug]
70+
options.outdir = slug ? path.join(process.cwd(), 'public', 'static', 'content', ...slug) : undefined
71+
options.publicPath = slug ? `/static/content${baseUrl}/${slug.join('/')}` : undefined
72+
options.write = true
7373

74-
// return options
75-
// },
74+
return options
75+
},
7676
});
7777

7878
if (res.errors.length > 0) { console.error(res.errors.map(({ detail }) => detail)); }

0 commit comments

Comments
 (0)