Socket
Socket
Sign inDemoInstall

entrypoint-assets-webpack-plugin

Package Overview
Dependencies
74
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    entrypoint-assets-webpack-plugin

Exports a mapping of entries to public paths of chunks


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Install size
202 kB
Created
Weekly downloads
 

Readme

Source

entrypoint-assets-webpack-plugin

Exports a JSON file that maps entry names to public paths of chunks for an entry grouped by chunk file extensions.

{
    "site": {
        "js": [
            "/public/common.js",
            "/public/site.js"
        ],
        "css": [
            "/public/common.css",
            "/public/site.css"
        ]
    },
    "admin": {
        "js": [
            "/public/common.js",
            "/public/admin.js"
        ],
        "css": [
            "/public/common.css",
            "/public/admin.css"
        ]
    }
}

This mapping can then be used to generate import assets in HTML by entry name not the asset names.

Usage

Install via npm:

npm install entrypoint-assets-webpack-plugin

Usage example:

const webpack = require('webpack')
const EntrypointAssetsPlugin = require('entrypoint-assets-webpack-plugin')

module.exports = {
    entry: {
        "site": "./site",
        "admin": "./admin"
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            name: "common",
            chunks: ["site", "admin"]
        }),
        new EntrypointAssetsPlugin()
    ]
};

Options

filename

Default:"entrypoints.json"

Exported entrypoints filename.

mappings

Default:

{
    "js": /\.js$/,
    "map": /\.map$/,
    "css": /\.css$/
}

Groups assets by regexp.

Keywords

FAQs

Last updated on 13 Dec 2017

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc