0.1.1 • Published 3 years ago

@nuxt/un v0.1.1

Weekly downloads
426
License
MIT
Repository
github
Last release
3 years ago

un

un

Once upon a time, one server was all needed to have a website

And then SPAs1 moved server code to browser

And then SSR2 moved browser code to server

And then Workers3 moved browser/server code to workers

Workers are neither NodeJS with process or Browser with window

Yet expected to run code that had to work both of them :}

1 Single Page Applications 2 Server Side Rendering 3 https://workers.cloudflare.com

What is un?

un is a collection of modules, polyfills and presets that work perfectly with any Javascript environemnt including Browsers, Workers, NodeJS or pure JavaScript.

You still need a bundler like rollup.js and un will disapear as soon as is bundled.

The goal is that final bundle works consistent regardless of running context yet not adding excessive polyfills.

Install

Install un as devDependency:

yarn add --dev @nuxt/un
# or
npm i -D @nuxt/un

You can import modules from @nuxt/un/runtime/

Env

import { env, nodeless } from '@nuxt/un'

const { alias, inject } = env(nodeless, {
  alias: {
    // custom aliases
  }
})

Presets

polyfills

NodeJS

http

net

stream

Mocks

Packages

License

MIT

0.1.1

3 years ago

0.0.12

3 years ago

0.1.0

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago