Skip to content

Commit bec3dc1

Browse files
bmeurerDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
Document usage of com.chrome.devtools.json for vanilla web apps.
Bug: 395562934 Change-Id: Ia4d7c3dabc0dba85e4956e1c8a511a7e84aa02a9 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6441924 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
1 parent c79279b commit bec3dc1

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

docs/ecosystem/automatic_workspace_folders.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,30 @@ To check if your setup is correct, you can try out Benedikt’s
9191
[Hello World][hello-world] demo project. Just follow the steps outlined in the
9292
`README.md` there.
9393

94-
## Vite
94+
### Vanilla Web App
95+
96+
To use the Automatic Workspace Folders feature with a vanilla web app, all you
97+
need to do is to create a `.well-known/appspecific` folder and place a
98+
`com.chrome.devtools.json` file there. Let's assume you're using [serve][serve]
99+
and you're directly serving the artifacts for your project from its source
100+
directory in `/Users/foo/bar`, then you could can accomplish the setup via:
101+
102+
```
103+
cd /Users/foo/bar
104+
mkdir -p .well-known/appspecific
105+
echo "{\"workspace\":{\"root\":\"${PWD}\",\"uuid\":\"`npx --package uuid uuid v1`\"}}" > .well-known/appspecific/com.chrome.devtools.json
106+
npx serve
107+
```
108+
109+
If everything is working correctly, you'll see requests from DevTools to
110+
`/.well-known/appspecific/com.chrome.devtools.json` in your `serve` output, e.g.:
111+
112+
```
113+
HTTP 4/9/2025 9:21:32 AM ::1 GET /.well-known/appspecific/com.chrome.devtools.json
114+
HTTP 4/9/2025 9:21:32 AM ::1 Returned 304 in 2 ms
115+
```
116+
117+
### Vite
95118

96119
There's also a proof-of-concept plugin for [vite](http://vite.dev) available at
97120
[ChromeDevTools/vite-plugin-devtools-json][vite-plugin], which you can easily
@@ -101,7 +124,8 @@ add to your existing project.
101124
[design-doc]: http://go/chrome-devtools:automatic-workspace-folders-design
102125
[demo]: http://go/chrome-devtools:automatic-workspace-folders-demo
103126
[workspace-doc]: https://developer.chrome.com/docs/devtools/workspaces
104-
[workspaces-announcement]: https://developer.chrome.com/blog/new-in-devtools-63#workspaces
127+
[workspace-announcement]: https://developer.chrome.com/blog/new-in-devtools-63#workspaces
105128
[design-doc-json]: https://goo.gle/devtools-json-design
106129
[hello-world]: https://github.com/bmeurer/automatic-workspace-folders-hello-world
130+
[serve]: https://www.npmjs.com/package/serve
107131
[vite-plugin]: https://github.com/ChromeDevTools/vite-plugin-devtools-json

0 commit comments

Comments
 (0)