• Stars
    star
    4,924
  • Rank 8,107 (Top 0.2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 4 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ‘ฉโ€๐Ÿš€ The tiny all-in-one development tool for modern web apps.

WMR

wmr logo

npm install size OpenCollective Backers OpenCollective Sponsors

The tiny all-in-one development tool for modern web apps, in a single 2mb file with no dependencies.

All the features you'd expect and more, from development to production:

๐Ÿ”จ ย  No entry points or pages to configure - just HTML files with <script type=module>
๐Ÿฆฆ ย  Safely import "packages" from npm without installation
๐Ÿ“ฆ ย  Smart bundling and caching for npm dependencies
โ†ป ย  Hot reloading for modules, Preact components and CSS
โšก๏ธ ย  Lightning-fast JSX support that you can debug in the browser
๐Ÿ’„ ย  Import CSS files and CSS Modules (*.module.css)
๐Ÿ”ฉ ย  Out-of-the-box support for TypeScript
๐Ÿ“‚ ย  Static file serving with hot reloading of CSS and images
๐Ÿ—œ ย  Highly optimized Rollup-based production output (wmr build)
๐Ÿ“‘ ย  Crawls and pre-renders your app's pages to static HTML at build time
๐ŸŽ ย  Built-in HTTP2 in dev and prod (wmr serve --http2)
๐Ÿ”ง ย  Supports Rollup plugins, even in development where Rollup isn't used

Quickstart (recommended)

Create a new project in seconds using create-wmr:

npm init wmr your-project-name

or

yarn create wmr your-project-name

illustration of installation to build for wmr

๐Ÿ’ If you'd like ESLint to be set up for you, add --eslint to the command. Note: this will use 150mb of disk space.

Check out the docs to learn more

Packages

Package Description Version
wmr Tiny all-in-one development tool for modern web apps wmr npm
create-wmr Create a new WMR project in seconds create-wmr npm
@wmrjs/directory-import Import a directory's files as an Array @wmrjs/directory-import npm
@wmrjs/nomodule Generate legacy fallback bundles for older browsers @wmrjs/nomodule npm
@wmrjs/service-worker Bundle service workers @wmrjs/service-worker npm
preact-iso Optimal code-splitting, hydration and routing for Preact preact-iso npm

Contributing

git clone [email protected]:preactjs/wmr.git
cd wmr
yarn

# run the demo (no compile)
yarn demo serve

# build and serve the demo for prod
yarn demo build:prod && yarn demo serve:prod

# build the single-file CLI:
yarn workspace wmr build

Adding a changeset

Don't forget to also include a changeset, by running this command at the root of the project:

yarn changeset

This will take you through a process of selecting the changed packages, the version updates and a description of the change. Afterwards, changesets, will generate a .md file inside a .changeset directory. Please commit that file as well.

After all that, you are good to go. ๐Ÿ‘

More Repositories

1

preact

โš›๏ธ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
JavaScript
36,018
star
2

preact-cli

๐Ÿ˜บ Your next Preact PWA starts in 30 seconds.
JavaScript
4,678
star
3

signals

Manage state with style in every framework
TypeScript
2,105
star
4

preact-router

๐ŸŒŽ URL router for Preact.
JavaScript
972
star
5

preact-compat

ATTENTION: The React compatibility layer for Preact has moved to the main preact repo.
JavaScript
951
star
6

awesome-preact

A curated list of amazingly awesome things regarding Preact ecosystem ๐ŸŒŸ
848
star
7

preact-render-to-string

๐Ÿ“„ Universal rendering for Preact: render JSX and Preact components to HTML.
JavaScript
574
star
8

compressed-size-action

GitHub Action that adds compressed size changes to your PRs.
JavaScript
541
star
9

next-plugin-preact

Next.js plugin for preact X
JavaScript
391
star
10

prefresh

Hot Module Reloading for Preact
JavaScript
351
star
11

preact-www

๐Ÿ“– Preact documentation website.
JavaScript
348
star
12

preact-custom-element

Wrap your component up as a custom element
JavaScript
343
star
13

preact-devtools

Browser extension for inspection Preact applications
TypeScript
295
star
14

preset-vite

Preset for using Preact with the vite bundler
TypeScript
233
star
15

eslint-config-preact

Unopinionated baseline ESLint config for Preact and Preact CLI codebases.
JavaScript
85
star
16

enzyme-adapter-preact-pure

Preact adapter for the Enzyme UI testing library
TypeScript
67
star
17

preact-ssr-prepass

Drop-in replacement for react-ssr-prepass
JavaScript
47
star
18

preact-integrations

A collection of sample apps demonstrating Preact's compatibility with various 3rd party libraries
JavaScript
35
star
19

rfcs

RFCs for changes and ideas in relation to Preact
30
star
20

create-preact

Create a Vite-powered Preact app in seconds
JavaScript
24
star
21

babel-plugin-transform-replace-expressions

A Babel plugin for replacing expressions with other expressions
JavaScript
23
star
22

jest-preset-preact

Jest preset for testing Preact apps
JavaScript
19
star
23

babel-plugin-transform-rename-properties

A Babel plugin for renaming JavaScript properties
JavaScript
19
star
24

preact-netlify

Preact's netlify CMS template
JavaScript
16
star
25

legacy-compat

React 15 compatibility layer for Preact
JavaScript
16
star
26

playwright-ct

Preact adapter for Playwright Component testing
TypeScript
15
star
27

preact-iso

Isomorphic utilities for Preact
JavaScript
12
star
28

compat-alias-package

JavaScript
10
star
29

babel-plugin-transform-hook-names

Add custom hook names for devtools
TypeScript
7
star
30

migrate-preact-x

JavaScript
6
star
31

preact-cli-experiment

TypeScript
4
star
32

codesandbox-template

JavaScript
4
star
33

.github

Default community files for the PreactJS organization
3
star