Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/olegkorol/look-mum-no-bundlers

SPA without bundlers.
https://github.com/olegkorol/look-mum-no-bundlers

browser cdn esmodules no-bundle preact react spa unpkg

Last synced: 10 days ago
JSON representation

SPA without bundlers.

Awesome Lists containing this project

README

        

# Look mum, no bundlers

## Description

This a small example to showcase a single page application (in this case using Preact) that makes no use of bundlers.

You just import the needed dependencies and write your app. No configuration, no boilerplate code. That's it.

## Quick Start

Run it with:

`npx serve`

Done :)

## Motivation

Are you tired of

* having so much boilerplate code, or
* so many configurations,
* etc.

...when you simply want to create `` and run it on your browser as fast as possible?

That's what you would usually do, right?

```javascript
import React from 'react';

/* TypeError: Failed to resolve module specifier 'react' */
```

The code above is not going to work on the browser, since importing by bare module specifiers is not supported (yet).

Let's get the dependency directly from `node_modules` then:

```javascript
import React from '/node_modules/react/index.js';

/* ReferenceError: process is not defined */
```

Oops. We are not using Node.js, so `process.env` will not be accessible on the browser? :(

**So, why not just use a CDN like UNPKG?**