Socket
Socket
Sign inDemoInstall

emotion-webpack-entrypoints-plugin

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    emotion-webpack-entrypoints-plugin

This is a webpack plugin that allows you to get all the entrypoints and insert them into your markup.


Version published
Maintainers
1
Install size
4.87 kB
Created

Readme

Source

What is this?

This is a webpack plugin that allows you to get all the entrypoints and insert them into your markup.

Instalation

npm i -D emotion-webpack-entrypoints-plugin

or

yarn add --dev emotion-webpack-entrypoints-plugin

Usage

const EntrypointsPlugin = require('emotion-webpack-entrypoints-plugin')

plugins: [
  new EntrypointsPlugin({
    dir: [folder with html],
    path: [path to your scripts]
  })
]

You must have a wrapper for scripts in HTML

HTML:
  <!-- BEGIN scripts -->
  <!-- END scripts -->

Example

webpack

const path = require('path')
const EntrypointsPlugin = require('emotion-webpack-entrypoints-plugin')

plugins: [
  new EntrypointsPlugin({
    dir: path.resolve(__dirname, 'src/templates/layouts'),
    path: './js'
  })
]

HTML input

 <!-- BEGIN scripts -->
 <!-- END scripts -->

HTML output

<!-- BEGIN scripts -->
  <script src="./js/vendors~app.js"></script> 
  <script src="./js/app.js"></script>
<!-- END scripts -->

Keywords

FAQs

Last updated on 04 Nov 2020

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