Skip to content

Commit 7420bbb

Browse files
authored
Merge branch 'main' into fix/object-Object
2 parents 35d9e82 + cecbc55 commit 7420bbb

File tree

6 files changed

+44
-15
lines changed

6 files changed

+44
-15
lines changed

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[![Bolt Open Source Codebase](./public/social_preview_index.jpg)](https://bolt.new)
22

3-
> Welcome to the **Bolt** open-source codebase! This repo cpontains a simple example app using the core components from bolt.new to help you get started building **AI-powered software development tools** powered by StackBlitz’s **WebContainer API**.
3+
> Welcome to the **Bolt** open-source codebase! This repo contains a simple example app using the core components from bolt.new to help you get started building **AI-powered software development tools** powered by StackBlitz’s **WebContainer API**.
44
55
### Why Build with Bolt + WebContainer API
66

7-
By building with the Bolt + WebContainer API you can create browser-based applications that let users **prompt, run, edit, and deploy** full-stack web apps directly in the browser, without the need for virtual machines. With WebContainer API, you can build apps that give AI direct access and full control over a **Node.js server**, **filesystem**, **package manager** and **dev terminal** inside your users browser tab. This powerful combination allows you to create a new class of development tools that support all major javascript libraries and node packages right out of the box, all without remote environments or local installs.
7+
By building with the Bolt + WebContainer API you can create browser-based applications that let users **prompt, run, edit, and deploy** full-stack web apps directly in the browser, without the need for virtual machines. With WebContainer API, you can build apps that give AI direct access and full control over a **Node.js server**, **filesystem**, **package manager** and **dev terminal** inside your users browser tab. This powerful combination allows you to create a new class of development tools that support all major JavaScript libraries and Node packages right out of the box, all without remote environments or local installs.
88

99
### What’s the Difference Between Bolt (This Repo) and [Bolt.new](https://bolt.new)?
1010

@@ -76,7 +76,7 @@ VITE_LOG_LEVEL=debug
7676
- `pnpm run build`: Builds the project.
7777
- `pnpm run start`: Runs the built application locally using Wrangler Pages. This script uses `bindings.sh` to set up necessary bindings so you don't have to duplicate environment variables.
7878
- `pnpm run preview`: Builds the project and then starts it locally, useful for testing the production build. Note, HTTP streaming currently doesn't work as expected with `wrangler pages dev`.
79-
- `pnpm test:` Runs the test suite using Vitest.
79+
- `pnpm test`: Runs the test suite using Vitest.
8080
- `pnpm run typecheck`: Runs TypeScript type checking.
8181
- `pnpm run typegen`: Generates TypeScript types using Wrangler.
8282
- `pnpm run deploy`: Builds the project and deploys it to Cloudflare Pages.

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Bolt.new: AI-Powered Full-Stack Web Development in the Browser
44

5-
Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI powered web dev agent using the Bolt open source codebase, [click here to get started!](./CONTRIBUTING.md)
5+
Bolt.new is an AI-powered web development agent that allows you to prompt, run, edit, and deploy full-stack applications directly from your browser—no local setup required. If you're here to build your own AI-powered web dev agent using the Bolt open source codebase, [click here to get started!](./CONTRIBUTING.md)
66

77
## What Makes Bolt.new Different
88

@@ -11,7 +11,7 @@ Claude, v0, etc are incredible- but you can't install packages, run backends or
1111
- **Full-Stack in the Browser**: Bolt.new integrates cutting-edge AI models with an in-browser development environment powered by **StackBlitz’s WebContainers**. This allows you to:
1212
- Install and run npm tools and libraries (like Vite, Next.js, and more)
1313
- Run Node.js servers
14-
- Interact with 3rd party APIs
14+
- Interact with third-party APIs
1515
- Deploy to production from chat
1616
- Share your work via a URL
1717

@@ -25,7 +25,7 @@ For developers interested in building their own AI-powered development tools wit
2525

2626
Here are some tips to get the most out of Bolt.new:
2727

28-
- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular Javacsript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly.
28+
- **Be specific about your stack**: If you want to use specific frameworks or libraries (like Astro, Tailwind, ShadCN, or any other popular JavaScript framework), mention them in your initial prompt to ensure Bolt scaffolds the project accordingly.
2929

3030
- **Use the enhance prompt icon**: Before sending your prompt, try clicking the 'enhance' icon to have the AI model help you refine your prompt, then edit the results before submitting.
3131

@@ -35,8 +35,8 @@ Here are some tips to get the most out of Bolt.new:
3535

3636
## FAQs
3737

38-
**Where do sign up for a paid plan?**
39-
Bolt.new is free to get started. If you need more AI tokens or want private projects, you can purchase a paid subscription in your [Bolt.new](https://bolt.new) settings, in the lower left hand corner of the application.
38+
**Where do I sign up for a paid plan?**
39+
Bolt.new is free to get started. If you need more AI tokens or want private projects, you can purchase a paid subscription in your [Bolt.new](https://bolt.new) settings, in the lower-left hand corner of the application.
4040

4141
**What happens if I hit the free usage limit?**
4242
Once your free daily token limit is reached, AI interactions are paused until the next day or until you upgrade your plan.
@@ -45,10 +45,10 @@ Once your free daily token limit is reached, AI interactions are paused until th
4545
Yes, Bolt.new is in beta, and we are actively improving it based on feedback.
4646

4747
**How can I report Bolt.new issues?**
48-
Check out the [Issues section](https://github.com/bolt.new/issues) to report an issue or request a new feature. Please use the search feature to check if someone else has already submitted the same issue/request.
48+
Check out the [Issues section](https://github.com/stackblitz/bolt.new/issues) to report an issue or request a new feature. Please use the search feature to check if someone else has already submitted the same issue/request.
4949

5050
**What frameworks/libraries currently work on Bolt?**
51-
Bolt.new supports most popular javascript frameworks and libraries. If it runs on StackBlitz, it will run on Bolt.new as well.
51+
Bolt.new supports most popular JavaScript frameworks and libraries. If it runs on StackBlitz, it will run on Bolt.new as well.
5252

5353
**How can I add make sure my framework/project works well in bolt?**
54-
We are excited to work with the javascript ecosystem to improve functionality in Bolt. Reach out to us via [[email protected]](mailto:[email protected]) to discuss how we can partner!
54+
We are excited to work with the JavaScript ecosystem to improve functionality in Bolt. Reach out to us via [[email protected]](mailto:[email protected]) to discuss how we can partner!

app/components/chat/BaseChat.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
6969
data-chat-visible={showChat}
7070
>
7171
<ClientOnly>{() => <Menu />}</ClientOnly>
72-
<div ref={scrollRef} className="flex overflow-scroll w-full h-full">
72+
<div ref={scrollRef} className="flex overflow-y-auto w-full h-full">
7373
<div className={classNames(styles.Chat, 'flex flex-col flex-grow min-w-[var(--chat-min-width)] h-full')}>
7474
{!chatStarted && (
7575
<div id="intro" className="mt-[26vh] max-w-chat mx-auto">

app/lib/runtime/action-runner.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ export class ActionRunner {
128128

129129
const webcontainer = await this.#webcontainer;
130130

131-
const process = await webcontainer.spawn('jsh', ['-c', action.content]);
131+
const process = await webcontainer.spawn('jsh', ['-c', action.content], {
132+
env: { npm_config_yes: true },
133+
});
132134

133135
action.abortSignal.addEventListener('abort', () => {
134136
process.kill();

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
"rehype-raw": "^7.0.0",
7272
"rehype-sanitize": "^6.0.0",
7373
"remark-gfm": "^4.0.0",
74+
"remix-island": "^0.2.0",
7475
"remix-utils": "^7.6.0",
7576
"shiki": "^1.9.1",
76-
"remix-island": "^0.2.0",
7777
"unist-util-visit": "^5.0.0"
7878
},
7979
"devDependencies": {

vite.config.ts

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { cloudflareDevProxyVitePlugin as remixCloudflareDevProxy, vitePlugin as remixVitePlugin } from '@remix-run/dev';
22
import UnoCSS from 'unocss/vite';
3-
import { defineConfig } from 'vite';
3+
import { defineConfig, type ViteDevServer } from 'vite';
44
import { nodePolyfills } from 'vite-plugin-node-polyfills';
55
import { optimizeCssModules } from 'vite-plugin-optimize-css-modules';
66
import tsconfigPaths from 'vite-tsconfig-paths';
@@ -24,7 +24,34 @@ export default defineConfig((config) => {
2424
}),
2525
UnoCSS(),
2626
tsconfigPaths(),
27+
chrome129IssuePlugin(),
2728
config.mode === 'production' && optimizeCssModules({ apply: 'build' }),
2829
],
2930
};
3031
});
32+
33+
function chrome129IssuePlugin() {
34+
return {
35+
name: 'chrome129IssuePlugin',
36+
configureServer(server: ViteDevServer) {
37+
server.middlewares.use((req, res, next) => {
38+
const raw = req.headers['user-agent']?.match(/Chrom(e|ium)\/([0-9]+)\./);
39+
40+
if (raw) {
41+
const version = parseInt(raw[2], 10);
42+
43+
if (version === 129) {
44+
res.setHeader('content-type', 'text/html');
45+
res.end(
46+
'<body><h1>Please use Chrome Canary for testing.</h1><p>Chrome 129 has an issue with JavaScript modules & Vite local development, see <a href="https://github.com/stackblitz/bolt.new/issues/86#issuecomment-2395519258">for more information.</a></p><p><b>Note:</b> This only impacts <u>local development</u>. `pnpm run build` and `pnpm run start` will work fine in this browser.</p></body>',
47+
);
48+
49+
return;
50+
}
51+
}
52+
53+
next();
54+
});
55+
},
56+
};
57+
}

0 commit comments

Comments
 (0)