@shopify/webpack-asset-metadata-plugin
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

@shopify/webpack-asset-metadata-plugin

License: MIT npm version

Webpack plugin use to generate manifest file.

Installation

$ yarn add @shopify/webpack-asset-metadata-plugin

Usage

import {AssetMetadataPlugin} from '@shopify/webpack-asset-metadata-plugin';

const compiler = webpack({
  plugins: [
    new AssetMetadataPlugin(
      {name: 'baseline'},
      {
        filename: 'assets.json',
        assetBasePath: path.resolve(buildDir, '..'),
        includeIntegrity: true,
      },
    ),
  ],
});

Options

identifier

A target name required. Display directly in the manifest file.

export interface ManifestIdentifier {
  locales?: string[];
  target: string;
}

browsers

Optional. Display directly in the manifest file.

assetBasePath

Optional. Default value 'false'.

Use if asset location is different from webpack setup. (ie. in Rails+React project it is public)

filename

Optional. Default value 'assets.json'. The name of the manifest file, often chaned to sewing-kit-manifest.json

includeIntegrity

Optional. Default value 'false'. This value is typically set to true for production mode.

Readme

Keywords

none

Package Sidebar

Install

npm i @shopify/webpack-asset-metadata-plugin

Weekly Downloads

8,034

Version

3.1.0

License

MIT

Unpacked Size

152 kB

Total Files

98

Last publish

Collaborators

  • jaimie.rockburn
  • blittle
  • shopify-admin
  • maryharte
  • crisfmb
  • pmoloney89
  • netlohan
  • st999999
  • justin-irl
  • megswim
  • wcandillon
  • nathanpjf
  • shopify-dep
  • goodforonefare
  • lemonmade
  • vsumner
  • wizardlyhel
  • antoine.grant
  • tsov
  • andyw8-shopify
  • henrytao
  • hannachen
  • vividviolet
  • bpscott