Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build, -no-bundle] --no-bundle does not work with multiple files #9859

Open
Garruxx opened this issue Apr 2, 2024 · 0 comments
Open

[build, -no-bundle] --no-bundle does not work with multiple files #9859

Garruxx opened this issue Apr 2, 2024 · 0 comments
Labels
bug Something isn't working bundler Something to do with the bundler

Comments

@Garruxx
Copy link

Garruxx commented Apr 2, 2024

What version of Bun is running?

1.1.0

What platform is your computer?

Linux 5.10.102.1-microsoft-standard-WSL2 x86_64 and Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

  • My app
    • src
      • main.tsx
      • app.tsx

main.tsx

import { App } from './app'
import React from 'react'
export const Main = () => {
	return (
		<div>
			<h1>Main</h1>
			<App />
		</div>
	)
}

app.tsx

import React from 'react'
export const App = () => {
	return (
		<div>
			<h1>Main</h1>
		</div>
	)
}
bun build --no-bundle ./src/main.tsx --outdir=dist

What is the expected behavior?

bun build --no-bundle ./src/main.tsx --outdir=dist
[5ms] transpile
  • My app
    • src
      • main.tsx
      • app.tsx
    • dist
      • main.js
      • app.js

What do you see instead?

image

  • My app
    • src
      • main.tsx
      • app.tsx
    • dist

The dist directory is created, but no file is included, dist is found empty.

Additional information

The problem occurs in WSL, Windows and Linux.

If I try to place this

jsx="preserve"

in the bunfig.toml I also get an error
image


name: --no-bundle doesn't work with multiple files
labels: bug, build, --no-bundle

@Garruxx Garruxx added the bug Something isn't working label Apr 2, 2024
@Garruxx Garruxx changed the title --no-bundle does not work with multiple files [build, -no-bundle] --no-bundle does not work with multiple files Apr 2, 2024
@paperdave paperdave added the bundler Something to do with the bundler label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bundler Something to do with the bundler
Projects
None yet
Development

No branches or pull requests

2 participants