New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nuxt-web-bundle

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-web-bundle

Generate web bundles with Nuxt

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

Nuxt Web Bundle

npm version npm downloads Github Actions Codecov

Generate web bundles with Nuxt 3

Features

⚠️ nuxt-web-bundle is an experiment. ⚠️

  • 📲 Share your website as a single file over Bluetooth.
  • ✨ Run it offline in your origin's context
  • ⚡️ Try out experimental web features.

Installation

With pnpm

pnpm add -D nuxt-web-bundle

Or, with npm

npm install -D nuxt-web-bundle

Or, with yarn

yarn add -D nuxt-web-bundle

Usage

export default defineNuxtConfig({
  modules: ['nuxt-web-bundle'],
  webBundle: {
    baseURL: 'https://my-website.com',
    // filename: 'bundle.wbn',
  },
})

That's it! Now when you run nuxi build or nuxi generate, a web bundle will be generated instead of a server or static directory.

As mentioned earlier, this is an experiment, and in order to experiment with Web Bundles, you can follow the steps here to enable usage in your version of Google Chrome.

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Stub module with pnpm dev:prepare
  • Run pnpm dev to start playground in development mode

Credits

Much of the implementation is taken from rollup-plugin-webbundle - check it out and try it if you are using Vite or another Rollup-based build system.

License

Made with ❤️

Published under the MIT License.

Keywords

nuxt

FAQs

Package last updated on 11 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts