New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hscmap/assets-installer-plugin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/assets-installer-plugin

## Introduction We can use webpack's library mode for creating a commonjs package. Let's assume that we created a package named 'myPackage'. To use this package from consumer side, simply do "require('myPackage')".

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Assets Installer Plugin

Introduction

We can use webpack's library mode for creating a commonjs package. Let's assume that we created a package named 'myPackage'. To use this package from consumer side, simply do "require('myPackage')".

However, if the package requires files other than main entry point, that are emitted by loaders such as file-loader and worker-loader, it is necessary to make those files in "dist" directory in the consumer side.

This webpack plugin copies the files that was emitted by file-loader, worker-loader, etc. to "dist" directory of the consumer side.

Example

const AssetsInstallerPlugin = require('@hscmap/assets-installer-plugin')

module.exports = {
    ...,
    plugins: [
        new AssetsInstallerPlugin({
            files: [
                ['@hscmap/stellar-globe', '{*.json,*.worker.js}']
            ]
        })
    ]
}

Reference

Options

  • files: [string, string][]
    • specifies files to copy
    • 1st item of each entry stands for name of the module  * 2nd item of each entry stands for patterns of files to copy (default: '{.json,.worker.js}')
  • always: boolean (default: false)
    • if true, copy files on every compilation
    • if no, copy files once upon starting webpack

FAQs

Package last updated on 16 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc