Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

assets-webpack-plugin

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assets-webpack-plugin

Emits a json file with assets paths

  • 3.8.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created

What is assets-webpack-plugin?

The assets-webpack-plugin is a Webpack plugin that generates a JSON file containing the paths of the output files. This is useful for server-side rendering or when you need to inject the assets into your HTML manually.

What are assets-webpack-plugin's main functionalities?

Generate JSON file with asset paths

This feature allows you to generate a JSON file that contains the paths of the output files. This is useful for server-side rendering or when you need to inject the assets into your HTML manually.

const AssetsWebpackPlugin = require('assets-webpack-plugin');

module.exports = {
  // other webpack configuration
  plugins: [
    new AssetsWebpackPlugin({
      path: path.join(__dirname, 'dist'),
      filename: 'assets.json'
    })
  ]
};

Customizing the output format

This feature allows you to customize the format of the generated JSON file. For example, you can enable pretty printing to make the JSON file more readable.

const AssetsWebpackPlugin = require('assets-webpack-plugin');

module.exports = {
  // other webpack configuration
  plugins: [
    new AssetsWebpackPlugin({
      path: path.join(__dirname, 'dist'),
      filename: 'assets.json',
      prettyPrint: true
    })
  ]
};

Including additional information

This feature allows you to include additional information in the generated JSON file. For example, you can specify which file types to include in the JSON file.

const AssetsWebpackPlugin = require('assets-webpack-plugin');

module.exports = {
  // other webpack configuration
  plugins: [
    new AssetsWebpackPlugin({
      path: path.join(__dirname, 'dist'),
      filename: 'assets.json',
      includeAllFileTypes: false,
      fileTypes: ['js', 'css']
    })
  ]
};

Other packages similar to assets-webpack-plugin

Keywords

FAQs

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