Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/olegkorol/look-mum-no-bundlers
- Owner: olegkorol
- Created: 2020-07-16T13:13:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-01T09:29:03.000Z (over 2 years ago)
- Last Synced: 2024-11-13T19:44:38.812Z (2 months ago)
- Topics: browser, cdn, esmodules, no-bundle, preact, react, spa, unpkg
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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?**