@aklinker1/aframe 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config.ts +6 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -23,6 +23,10 @@ export type UserConfig = {
|
|
|
23
23
|
* @default true
|
|
24
24
|
*/
|
|
25
25
|
compile?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* List of dependencies to externalize. Native dependencies are good candidates.
|
|
28
|
+
*/
|
|
29
|
+
external?: string[];
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
export type PrerenderConfig = {
|
|
@@ -62,6 +66,7 @@ export type ResolvedConfig = {
|
|
|
62
66
|
serverEntryPath: string;
|
|
63
67
|
compileOutputPath: string;
|
|
64
68
|
compile: boolean;
|
|
69
|
+
external: string[];
|
|
65
70
|
};
|
|
66
71
|
|
|
67
72
|
export function defineConfig(config: UserConfig): UserConfig {
|
|
@@ -165,5 +170,6 @@ export async function resolveConfig(
|
|
|
165
170
|
prerender: userConfig.prerender ?? {},
|
|
166
171
|
hooks: userConfig.hooks,
|
|
167
172
|
compile: userConfig.compile ?? true,
|
|
173
|
+
external: userConfig.external ?? [],
|
|
168
174
|
};
|
|
169
175
|
}
|
package/src/index.ts
CHANGED
|
@@ -149,6 +149,7 @@ export async function build(config: ResolvedConfig) {
|
|
|
149
149
|
autoloadPackageJson: true,
|
|
150
150
|
},
|
|
151
151
|
entrypoints: [config.serverEntryPath],
|
|
152
|
+
external: config.external,
|
|
152
153
|
target: "bun",
|
|
153
154
|
});
|
|
154
155
|
console.log(`${GREEN}✔${RESET} Compiled in ${compileTimer()}`);
|