Skip to content

Support webpack 4 and Multiple compilations

Compare
Choose a tag to compare
@bensampaio bensampaio released this 01 Nov 14:06
· 38 commits to master since this release

💥 Breaking Change

  • The plugin is now the main import of this package. In other words:
    • import SvgStorePlugin from 'external-svg-sprite-loader/lib/SvgStorePlugin'; is now import SvgStorePlugin from 'external-svg-sprite-loader';
    • const SvgStorePlugin = require('external-svg-sprite-loader/lib/SvgStorePlugin'); is now const SvgStorePlugin = require('external-svg-sprite-loader');
  • To use the loader you should now always use SvgStorePlugin.loader. If you use the loader name like external-svg-sprite-loader then it won't work.
  • The store object is no longer shared across multiple compilers and it is no longer a static property of SvgStorePlugin. It is now a property of an instance of SvgStorePlugin.

🚀 Feature

  • Upgrade to Webpack 4
  • Upgrade all dependencies
  • Use new Tapable API
  • Use iterables instead of forEach and map functions on Chunks and Modules
  • Use mini-css-extract-plugin instead of extract-text-webpack-plugin
  • Show warning when dimensions information is missing for an icon
  • HMR
  • In the example apps:
    • Rewrite React components as stateless components
    • Generate multiple sprites
    • Add server rendering