🚨 Breaking Changes
-
Option
name
andoutputPath
: Thename
option's[query]
placeholder and the third parameter of theoutputPath
option (in function form) will start with?
to align with the behavior offile-loader
. (#102)// before: libAssetsPlugin({ name: '[name].[contenthash:8].[ext]?[query]', outputPath: (url, resourcePath, resourceQuery) => { // `url` - file name processed by the `name` option,eg: `logo.fb2133.png` // `resourcePath` - `/original/absolute/path/to/file.js` // `resourceQuery` - `foo=bar` return url.endsWith('.png') ? 'image' : 'assets' }, }) // after: libAssetsPlugin({ // no longer need a `?` between [ext] and [query] name: '[name].[contenthash:8].[ext][query]', // `resourceQuery` parameter will start with `?` outputPath: (url, resourcePath, resourceQuery) => { // `url` - file name processed by the `name` option,eg: `logo.fb2133.png` // `resourcePath` - `/original/absolute/path/to/file.js` // `resourceQuery` - `?foo=bar` return url.endsWith('.png') ? 'image' : 'assets' }, })
🐞 Bug Fixes
- Fix
resourceQuery
value(remove prefixed ?) - by Saiya (6bb63) - Fix corrupt of binary file after building - by Saiya (a5735)