-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.ts
More file actions
50 lines (48 loc) · 1.45 KB
/
Copy pathbuild.config.ts
File metadata and controls
50 lines (48 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { defineBuildConfig } from "unbuild";
export default defineBuildConfig({
entries: [
"src/index",
"src/cli/index",
"src/config/index",
"src/overrides/incrementalCache/azure-blob",
"src/overrides/tagCache/azure-table",
"src/overrides/queue/azure-queue",
"src/overrides/imageLoader/azure-blob",
"src/overrides/imageOptimization/azure-cached",
"src/adapters/wrappers/azure-functions",
"src/adapters/wrappers/azure-image-optimization",
"src/adapters/converters/azure-http",
"src/adapters/image-optimization",
],
declaration: true,
clean: true,
failOnWarn: false,
outDir: "dist",
hooks: {
// Copy infrastructure templates to dist at build time
"build:done": async ctx => {
const fs = await import("fs/promises");
const path = await import("path");
await fs.cp("infrastructure", path.join(ctx.options.outDir, "infrastructure"), { recursive: true });
},
},
rollup: {
emitCJS: false,
esbuild: {
target: "node18",
minify: false,
},
output: {
entryFileNames: "[name].js",
chunkFileNames: "[name].js",
},
},
externals: [
"@opennextjs/aws",
"@azure/storage-blob",
"@azure/data-tables",
"@azure/storage-queue",
"@azure/functions",
"commander",
],
});