File Loader
resourcePath
is now available in outputPath
and publicPath
(#304) (0d66e64)context
is now available in outputPath
and publicPath
(#305) (d5eb823)useRelativePath
option. It is dangerously and break url when you use multiple entry points.Code Refactoring
BREAKING CHANGES
engines
of "node": ">=6.9.0 < 7.0.0 || >= 8.9.0"
Bug Fixes
webpack.config.js
{
test: /\.svg$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets/',
publicPath: 'public/'
}
}
]
})
bundle.js
/***/ (function(module, exports) {
- module.exports = "./public/assets/file.svg";
+ module.exports = "./public/file.svg";
/***/ }),
|- src
| |– file.svg
|– dist
| |– assets
| | |– file.svg