Skip to main content
Troubleshooting

All JavaScript Empty

Your deployed JavaScript files contain no code.

Symptom

After deploying, the CDN URL for your JavaScript bundle returns an empty response or a minimal IIFE wrapper with no meaningful code inside. The embed code is in place, but nothing executes on the page.

Likely Causes

  1. All files are barrel files: Every JS/TS file in the project only contains re-export statements (export * from './other'). The entry point detector classifies all files as barrels and excludes them from the build. With no entry points, esbuild produces empty output.

  2. All files are excluded from bundling: Every file has its include_in_bundle or include_in_per_file flag set to off. The build system skips excluded files.

  3. All files are empty: The files exist in the file tree but contain no code (or only whitespace and comments).

  4. Files are in a folder bundle but the folder is not marked as a bundle: In folder bundle mode, files inside an unmarked folder do not participate in any bundle output.

  5. Unsupported file types only: The project contains only non-buildable files (.json, .txt, .md, .html, .svg). These file types are stored but not bundled.

Checks

  1. Open the file tree and verify at least one .js, .ts, .jsx, .tsx, .css, or .scss file has content.
  2. Check that at least one JS/TS file has executable code (not just export statements). A file with export * from './utils' and nothing else is a barrel and will not produce output.
  3. Right-click a file and check whether Include in bundle (bundled mode) or Include in per-file output (per-file mode) is enabled.
  4. If using folder bundles, verify the folder is marked as a bundle (right-click the folder in the file tree).
  5. Check the build metadata in the deploy panel. If buildStats.js is absent or buildStats.js.size is 0, the build produced no meaningful JavaScript output.

Fixes

Add executable code

Ensure at least one file contains code that runs (e.g., function calls, DOM manipulation, event listeners), not just exports. Example:

main.js
// This alone produces no output (barrel file):
export * from './utils';

// This produces output:
import { init } from './utils';
init();

Check bundle inclusion flags

  1. Right-click the file in the file tree.
  2. Enable Include in bundle or Include in per-file output depending on your deployment mode.
  3. Redeploy.

Check folder bundle configuration

  1. Right-click the folder containing your files.
  2. Select Mark as bundle if it is not already marked.
  3. Redeploy.

Use supported file types

Rename or convert non-buildable files. For example, rename config.txt to config.js if it contains JavaScript.

What to Capture for Escalation

  1. The deployment mode (bundled, per-file, or folder bundle).
  2. The file tree structure: list of files with their paths.
  3. Whether any files contain only export statements.
  4. The include_in_bundle and include_in_per_file flag states for each file.
  5. The CDN URL and its response body (even if empty).