@aklinker1/aframe 1.1.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aklinker1/aframe",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "packageManager": "bun@1.3.5",
5
5
  "type": "module",
6
6
  "license": "MIT",
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
@@ -145,8 +145,12 @@ export async function build(config: ResolvedConfig) {
145
145
  await Bun.build({
146
146
  compile: {
147
147
  outfile: config.compileOutputPath,
148
+ // @ts-expect-error: Missing type until 1.3.6: https://github.com/oven-sh/bun/commit/822d75a3802ecc1fc5439427e14bf0d57107e303
149
+ autoloadPackageJson: true,
148
150
  },
149
151
  entrypoints: [config.serverEntryPath],
152
+ external: config.external,
153
+ target: "bun",
150
154
  });
151
155
  console.log(`${GREEN}✔${RESET} Compiled in ${compileTimer()}`);
152
156
  console.log(