hyperspan 1.0.9 → 1.0.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.ts +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperspan",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Hyperspan CLI - for @hyperspan/framework",
5
5
  "type": "module",
6
6
  "public": true,
package/src/server.ts CHANGED
@@ -75,6 +75,10 @@ export async function addDirectoryAsRoutes(
75
75
  const buildDir = join(CWD, '.build');
76
76
  const cssPublicDir = join(CWD, server._config.publicDir, CSS_PUBLIC_PATH);
77
77
 
78
+ // Read local package.json to get the dependencies, so we can exclude them from the build for CSS below.
79
+ const packageJson = await Bun.file(join(CWD, 'package.json')).json();
80
+ const dependencies = packageJson.dependencies;
81
+
78
82
  log(`Scanning directory for routes: ${directoryPath}`);
79
83
 
80
84
  try {
@@ -135,9 +139,8 @@ export async function addDirectoryAsRoutes(
135
139
  minify: IS_PROD,
136
140
  format: 'esm',
137
141
  target: 'node',
138
- // Only extract CSS — don't bundle framework packages or component files.
139
- // Under bun --watch, bundling @hyperspan/* causes EISDIR path collisions.
140
- external: ['@hyperspan/*', '*.vue', '*.svelte', '*.tsx', '*.jsx'],
142
+ // Only extract CSS — don't bundle framework packages, dependencies, or component files.
143
+ external: [...Object.keys(dependencies), '@hyperspan/*', '*.vue', '*.svelte', '*.tsx', '*.jsx', '*.ts', '*.js'],
141
144
  });
142
145
 
143
146
  // Move CSS files to the public directory