Skip to content

Release version 5.0.0

Choose a tag to compare

@SirPole SirPole released this 19 Jul 19:22
8d7be73

Thanks to all for your bug reports and feature suggestions!

New features

  • Added text option to fonts, to allow download of only specific characters instead of the whole font face.
  • Added filename option to specify custom resulting file. Rewrites [name], [hash] and [chunkhash].
  • Added basic google analytics statistics, you may opt out at any time by setting stats to false. I am only collecting options to get an idea how are people using the plugin (and to have some cool data to look at 😉)

Other changes

  • Rewrote the entire thing to typescript, phew.
  • Updated dependencies

Fixed issues

  • Fixed chunk lookup when split chunks were used (#14)
  • Fixed redundant 1.main.js file (#13)

Breaking changes

  • Dropped neon-js support to make the plugin a bit lighter, you now need to parse it yourself:
const GoogleFontsPlugin = require('google-fonts-plugin')
const { decode } = require('neon-js')
const { resolve } = require('path')
const { readFileSync } = require('fs')
const configFile = resolve(__dirname, 'path', 'to', 'config.neon')

// webpack config object
...
plugins: [
  new GoogleFontsPlugin(decode(readFileSync(configFile, 'utf8'), 'object')['google-fonts-plugin'])
]