New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

html-webpack-mountpoint-plugin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-webpack-mountpoint-plugin

A simple plugin that adds SPA mountpoints to the default template. Intended for use with the html-webpack-plugin.

latest
Source
npmnpm
Version
0.0.14
Version published
Maintainers
1
Created
Source

html-webpack-mountpoint-plugin

This is a naive utility that adds application mount points to the default html template provided by html-webpack-plugin (use with webpack4)

Basic Usage

to install:

  • npm i html-webpack-mountpoint-plugin --save-dev
    or
  • yarn add html-webpack-mountpoint-plugin -D

webpack.config.js


const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackMountpointPlugin = require('html-webpack-mountpoint-plugin');
...
{
  plugins: [
    new HtmlWebpackPlugin({
      title: 'WebpackMountpointTest',
      <options>
    }),
    new HtmlWebpackMountpointPlugin({
      tagName: 'section',
      mountPoints: ['app-hook', 'dialogs-hook']
    }) ...

    or

    new HtmlWebpackMountpointPlugin([
      {
        tagName: 'section',
        id: 'app-hook',
        attributes: {
          className: 'spa mount'
        }
      },
      {
        tagName: 'div',
        id: 'dialogs-hook',
        attributes: {
          className: 'too-cool'
        }
      },
    ])
  ], ...
}

produces: index.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>WebpackMountpointTest</title>
  </head>
  <body>
    <section id="app-hook"></section>
    <section id="dialogs-hook"></section>
    <script type="text/javascript" src="src.bundle.js"></script>
  </body>
  <!--  or  -->
  <body>
    <section id="app-hook" class="spa mount"></section>
    <div id="dialogs-hook" class="too-cool"></div>
    <script type="text/javascript" src="src.bundle.js"></script>
  </body>
</html>

Please post any issues or feature requests to https://github.com/AdamAtri/html-webpack-mountpoint-plugin/issues

Keywords

html-webpack-plugin

FAQs

Package last updated on 31 May 2018

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