Skip to content

Webpack plugin to inject meta tag to after-built Html. | 注入Meta标签到编译后的Html页面中

Notifications You must be signed in to change notification settings

superhos/meta-inject-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

MetaInjectWebpackPlugin

Feature

Webpack plugin to inject meta tag to Html.

Use

Step 1. configration

Notice that: HtmlWebpackPlugin is necessary.

const MetaInjectWebpackPlugin = require('meta-inject-webpack-plugin')

// Webapck config
const webpackConfig = {
  // ...
  plugin: [
      // ...
      new MetaInjectWebpackPlugin({
          meta: [
            {
                name: 'renderer',
                content: 'webket'   
            },
            '<meta name="test" content="test">'
          ]
      })
  ]
}
  1. Build it!

And you can check out these meta tag in after-built html file.

License

MIT

Copyright(c) 2020-present, @sevenschan

About

Webpack plugin to inject meta tag to after-built Html. | 注入Meta标签到编译后的Html页面中

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published