html-webpack-code-inject-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

html-webpack-code-inject-plugin

Webpack config

const HtmlWebpackCodeInjectPlugin = require('html-webpack-code-inject-plugin').default;

module.exports = {
  plugins: [
    new HtmlWebpackPlugin({
      // some config
    }),
    new HtmlWebpackCodeInjectPlugin({
      headHtmlTagObjectList: [
        {
          tagName: "script",
          innerHTML: `
            window.onresize = function() {
              console.log('test')
            }
          `
        }
      ],
      excludeFileCallback: (fileName) => fileName === 'test.html'
    })
  ]
};

LICENSE

MIT

Package Sidebar

Install

npm i html-webpack-code-inject-plugin

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

9.28 kB

Total Files

6

Last publish

Collaborators

  • april1993