1.0.1 • Published 4 years ago

custom-assets-webpack-plugin v1.0.1

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

custom-assets-webpack-plugin

Webpack plugin for custom assets files.

Install

npm install --save-dev custom-assetes-webpack-plugin
yarn add --dev custom-assetes-webpack-plugin

Usage

const CustomAssetsWebpackPlugin = require('custom-assets-webpack-plugin')

module.exports = {
  entry: 'app.js',
  output: {
    path: __dirname + '/dist',
    filename: 'app.[chunkhash].js'
  },
  plugins: [
    new CustomAssetsWebpackPlugin({
        filename: 'assets.json',
        content: JSON.stringify({
           res: {
               jquery: 'assets/jquery.js'
           }
        })
    })
  ]
}

assets.json

{
  "res":{
    "jquery":"https://code.jquery.com/jquery-3.4.1.js"
  }
}