npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-yew-parcel

v0.18.1

Published

<div align="center"> <p> <a href="https://discord.gg/ZHWmUaf" target="_blank"><img alt="Discord Chat" src="https://img.shields.io/badge/Discor-Spielrs%20-yellowgreen"/></a> <a href="https://github.com/spielrs/yew-parcel-template/blob/m

Readme

Yew Parcel Template

Kickstart your Yew, Yew-Router, WebAssembly, and Parcel project!

This template comes pre-configured with all the boilerplate for compiling Yew framework and Yew Router to WebAssembly and hooking into a Parcel build pipeline.

  • npm start -- Serve the project locally for development at http://localhost:1234 by default.

  • npm build -- Serve the project in production mode (gzip compression and high level wasm optimization)

Using This Template

cargo install wasm-pack
npm init yew-parcel my-app
npm install

Configuration

You will want to change the name of your crate however also you need to change the import js file name that generate the wasm pack in the index.html with the new name of your crate

  <script type="module">
    import init, { run } from './name_of_your_crate.js';

    const start = async() => {
      await init('./name_of_your_crate_bg.wasm');
      run();
    };

    start();
  </script>

You maybe want that parcel watch more than everything call by index.html, and the src and Cargo.toml of the crate, you need to add the path in the watcher of wasm-builder:

    chokidar.watch(['./crate/src', './crate/Cargo.toml', './crate/your_new_path_to_watch']).on('change', async (event, path) => {
        console.log(`there are new changes in '${path}'. Start to rebuild rustwasm sources`);

        bundler.bundle();

        bundler.hmr.broadcast({
            type: 'reload'
        });
    });

You can also change the address of the parcel server adding a .env file with the next setting:

SERVER_ADDRESS=[YOUR_ADDRESS]:[YOUR_PORT]

In case that you want to customize the wasm-pack build you will find it in wasm_pack_cmd sh. For powerShell you will need to write your own script and change the name of execution file in wasm-builder.js:

    bundler.on('buildStart', () => {
        const prevtBuildFile = Path.join(__dirname, './your_script.ps1');
        console.log(`running: ${prevtBuildFile}`);
        execSync(`${prevtBuildFile} ${buildType === 'production' ? '' : '--dev'}`, {stdio: 'inherit'});
    });

For static files you need to include in the package.json:

"staticFiles": {
  "staticPath": ["./crate/pkg", "./crate/your_static_folder"],
  "watcherGlob": false
}

The static directory has to be included in some subfolder, not in the root path or it will be ignored. The bundle move the content of the directory into the dist not the directory itself

Limitations

If the server is closed while pages are still serving and after it is running again, the browser will not synchronize again with the server until you refresh the pages manually.

Do you like Yew Parcel Template?

If you like Yew Parcel Template, help us supporting the project:

  • BAT rewards in case that you use Brave Browser
  • Using this link to create an account in Binance (get 10% fee back for every trading)

Rustc Version Required

  • 1.40.0 or higher

Attention

  • if you don't want web_sys, change the feature of yew and yew_router to std_web in cargo.toml file and remove in your cargo config file:
[build]
target="wasm32-unknown-unknown"

License

Yew Parcel Template is MIT licensed. See license