Skip to content

RossMcMillan92/add-assets-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

add-assets-webpack-plugin

Add arbitrary assets to a Webpack build

Install

npm install --save-dev add-assets-webpack-plugin

or

yarn add -D add-assets-webpack-plugin

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'
  }
])

About

Add arbitrary assets to a Webpack build

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published