webpack-staticmap-plugin

generate assets map of webpack(v4) compilation

Usage no npm install needed!

<script type="module">
  import webpackStaticmapPlugin from 'https://cdn.skypack.dev/webpack-staticmap-plugin';
</script>

README

webpack-staticmap-plugin

npm

generate assets map of webpack(v4) compilation

Usage

npm install webpack-staticmap-plugin --save-dev

webpack.config.js:

const StaticMapPulgin = require('webpack-staticmap-plugin');

module.exports = {
  module: {
    rules: [...]
  },
  plugins: [
    new StaticMapPulgin({
      // options
    })
  ]
}

Options

  • outputfile: specific name of the generated file, static.json by default;
  • dev: enable/disable development mode;
  • publicPath: root path of all static files,default to be '/';

assets map info would be assigned to global varable under development mode.