New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

nuxt-charset-module

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-charset-module

inject `<meta charset>` to first of `<head>`.

0.2.1
latest
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created

nuxt-charset-module

inject <meta charset> to first of <head>.

Why

https://web.dev/charset/

A <meta charset> element in the <head> of the document that is completely contained in the first 1024 bytes of the document

Setup

Install

npm install --save-dev nuxt-charset-module
# OR
yarn add nuxt-charset-module

Remove current charset

 // nuxt.config.js
 
 export default {
   head: {
     meta: [
-      { charset: 'utf-8' },
     ],
   },
 };

Load Module

// nuxt.config.js

export default {
  modules: [
    // 'other-module',
    // 'other-module',
    'nuxt-charset-module', // <- Insert to LAST!
  ],
};

Add Options

If you use 'utf-8', You don't need to write this.

// nuxt.config.js

export default {
  modules: [
    'nuxt-charset-module',
  ],
  charset: {
    charset: 'utf-8', // default
  },
};

// OR

export default {
  modules: [
    [
      'nuxt-charset-module',
      {
        charset: 'utf-8', // default
      }
    ],
  ],
};

FAQs

Package last updated on 25 Jan 2022

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