Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/kit

Package Overview
Dependencies
Maintainers
6
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/kit

Toolkit for authoring modules and interacting with Nuxt

  • 3.11.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593K
decreased by-42.38%
Maintainers
6
Weekly downloads
 
Created

What is @nuxt/kit?

@nuxt/kit is a toolkit for developing Nuxt modules and extending the Nuxt framework. It provides utilities and helpers to streamline the process of creating and managing Nuxt modules, making it easier to integrate custom functionality into Nuxt applications.

What are @nuxt/kit's main functionalities?

Define Nuxt Module

This feature allows you to define a Nuxt module with metadata, default options, and a setup function. The setup function is where you can add your custom logic to extend Nuxt's functionality.

export default defineNuxtModule({
  meta: {
    name: 'my-module',
    configKey: 'myModule'
  },
  defaults: {
    option: true
  },
  setup (options, nuxt) {
    // Module setup code here
  }
})

Add Plugin

This feature allows you to add a plugin to your Nuxt application. The `addPlugin` function is used to specify the path to the plugin file, which will be included in the Nuxt build process.

import { addPlugin } from '@nuxt/kit'

export default defineNuxtModule({
  setup (options, nuxt) {
    addPlugin({ src: resolve(__dirname, 'plugin.js') })
  }
})

Extend Webpack Config

This feature allows you to extend the Webpack configuration used by Nuxt. The `extendWebpackConfig` function provides access to the existing Webpack config, which you can modify to include custom rules, plugins, or other settings.

import { extendWebpackConfig } from '@nuxt/kit'

export default defineNuxtModule({
  setup (options, nuxt) {
    extendWebpackConfig(config => {
      config.module.rules.push({
        test: /\.custom$/,
        loader: 'custom-loader'
      })
    })
  }
})

Other packages similar to @nuxt/kit

FAQs

Package last updated on 17 Mar 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc