forked from rolldown/rolldown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(playground): cleanup unused files, replace path-browserify (r…
…olldown#345) * refactor(playground): cleanup unused files & plugins * refactor: replace path-browserify with pathe reduce bundle size, about 3.06 kB
- Loading branch information
Showing
11 changed files
with
28 additions
and
214 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1 @@ | ||
<div align="center"> | ||
|
||
<h1><code>create-wasm-app</code></h1> | ||
|
||
<strong>An <code>npm init</code> template for kick starting a project that uses NPM packages containing Rust-generated WebAssembly and bundles them with Webpack.</strong> | ||
|
||
<p> | ||
<a href="https://travis-ci.org/rustwasm/create-wasm-app"><img src="https://img.shields.io/travis/rustwasm/create-wasm-app.svg?style=flat-square" alt="Build Status" /></a> | ||
</p> | ||
|
||
<h3> | ||
<a href="#usage">Usage</a> | ||
<span> | </span> | ||
<a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a> | ||
</h3> | ||
|
||
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub> | ||
|
||
</div> | ||
|
||
## About | ||
|
||
This template is designed for depending on NPM packages that contain | ||
Rust-generated WebAssembly and using them to create a Website. | ||
|
||
- Want to create an NPM package with Rust and WebAssembly? [Check out | ||
`wasm-pack-template`.](https://github.com/rustwasm/wasm-pack-template) | ||
- Want to make a monorepo-style Website without publishing to NPM? Check out | ||
[`rust-webpack-template`](https://github.com/rustwasm/rust-webpack-template) | ||
and/or | ||
[`rust-parcel-template`](https://github.com/rustwasm/rust-parcel-template). | ||
|
||
## 🚴 Usage | ||
|
||
``` | ||
npm init wasm-app | ||
``` | ||
|
||
## 🔋 Batteries Included | ||
|
||
- `.gitignore`: ignores `node_modules` | ||
- `LICENSE-APACHE` and `LICENSE-MIT`: most Rust projects are licensed this way, so these are included for you | ||
- `README.md`: the file you are reading now! | ||
- `index.html`: a bare bones html document that includes the webpack bundle | ||
- `index.js`: example js file with a comment showing how to import and use a wasm pkg | ||
- `package.json` and `package-lock.json`: | ||
- pulls in devDependencies for using webpack: | ||
- [`webpack`](https://www.npmjs.com/package/webpack) | ||
- [`webpack-cli`](https://www.npmjs.com/package/webpack-cli) | ||
- [`webpack-dev-server`](https://www.npmjs.com/package/webpack-dev-server) | ||
- defines a `start` script to run `webpack-dev-server` | ||
- `webpack.config.js`: configuration file for bundling your js with webpack | ||
|
||
## License | ||
|
||
Licensed under either of | ||
|
||
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) | ||
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
|
||
at your option. | ||
|
||
### Contribution | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally | ||
submitted for inclusion in the work by you, as defined in the Apache-2.0 | ||
license, shall be dual licensed as above, without any additional terms or | ||
conditions. | ||
# Rolldown Playground |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
|
||
import vue from '@vitejs/plugin-vue' | ||
import topLevelAwait from 'vite-plugin-top-level-await' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
vue(), | ||
topLevelAwait({ | ||
// The export name of top-level await promise for each chunk module | ||
promiseExportName: '__tla', | ||
// The function to generate import names of top-level await promise in each chunk module | ||
promiseImportName: (i) => `__tla_${i}`, | ||
}), | ||
], | ||
plugins: [vue()], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters