File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,25 @@ Otherwise the rest of the deployment magic happens in `index.html`:
35
35
{{#include ../../../examples/without-a-bundler/index.html}}
36
36
```
37
37
38
+ > ** Note** : You cannot directly open ` index.html ` in your web browser due to [ CORS] [ cors ]
39
+ > limitations. Instead, you can set up a quick development environment using
40
+ > Python's built-in HTTP server:
41
+ > ``` sh
42
+ > wasm-pack build --target web
43
+ > python3 -m http.server 8080
44
+ > ` ` `
45
+ > If you don' t have Python installed, you can also use [miniserve][miniserve] which
46
+ > is installable via Cargo:
47
+ > ```sh
48
+ > cargo install miniserve
49
+ > miniserve . --index "index.html" -p 8080
50
+ > ```
51
+
38
52
And that' s it! Be sure to read up on the [deployment options][deployment] to see
39
53
what it means to deploy without a bundler.
40
54
55
+ [cors]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
56
+ [miniserve]: https://crates.io/crates/miniserve
41
57
[deployment]: ../reference/deployment.html
42
58
43
59
# # Using the older `--target no-modules`
You can’t perform that action at this time.
0 commit comments