nuxt-weblock
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

Nuxt WebLock Module

npm version npm downloads License Nuxt

Nuxt 3 module to lock your whole website with password. All routes will be inaccessible until the correct password is entered.

Features

  • 🔒 Lock your whole website with password. Ideal for staging environments, client previews, etc.
  • 🍪 Successfully entered password will be stored in a cookie, so you don't have to enter it again.

nuxt-weblock screenshot

Quick Setup

  1. Add nuxt-weblock dependency to your project
# Using pnpm
pnpm add nuxt-weblock

# Using yarn
yarn add nuxt-weblock

# Using npm
npm install nuxt-weblock
  1. Add nuxt-weblock to the modules section of nuxt.config.ts/js and configure nuxt-weblock by defining webLock section
export default defineNuxtConfig({
  modules: [
    'nuxt-weblock'
  ],
  webLock: {
    password: '123456', // safer password might be a better idea 😁
    isEnabled: true // ideal to be set to false in production
  }
})

That's it! You can now use WebLock Module in your Nuxt app ✨

Development

# Install dependencies
yarn install

# Generate type stubs
yarn run dev:prepare

# Develop with the playground
yarn run dev

# Build the playground
yarn run dev:build

# Run ESLint
yarn run lint

# Release new version
yarn run release

Readme

Keywords

none

Package Sidebar

Install

npm i nuxt-weblock

Weekly Downloads

32

Version

1.0.14

License

MIT

Unpacked Size

9.3 kB

Total Files

12

Last publish

Collaborators

  • krftcz