1.0.0 • Published 7 years ago

add-assets-webpack-plugin v1.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

add-assets-webpack-plugin

Add arbitrary assets to a Webpack build

Usage

new AddAssetsWebpackPlugin({
  filePath: "static/file.txt",
  content: 'Contents of the file'
})

Options

filePath: The file name (and path), relative to the webpack output directory

contents: The desired contents of the file

Multiple files

The constructor can take an object, or an array of objects:

new AddAssetsWebpackPlugin([
  {
    filePath: ".env",
    content: process.env.NODE_ENV
  },
  {
    filePath: "other.txt",
    content: 'eyy lmao'
  }
])