nuxt-charset-module
v0.2.1
Published
inject `<meta charset>` to first of `<head>`.
Downloads
2
Readme
nuxt-charset-module
inject <meta charset>
to first of <head>
.
Why
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
}
],
],
};