File Loader Versions Save

File Loader

v4.1.0

4 years ago

4.1.0 (2019-07-18)

Features

v4.0.0

4 years ago

4.0.0 (2019-06-05)

chore

BREAKING CHANGES

  • deps: minimum required nodejs version is 8.9.0

v3.0.1

5 years ago

3.0.1 (2018-12-20)

Bug Fixes

  • relax options validation for additional properties (#309) (c74d44e)

v3.0.0

5 years ago

3.0.0 (2018-12-20)

Code Refactoring

  • drop support for webpack < 4 (#303) (203a4ee)
  • more validations in options schema

Features

  • resourcePath is now available in outputPath and publicPath (#304) (0d66e64)
  • context is now available in outputPath and publicPath (#305) (d5eb823)

BREAKING CHANGES

  • removed the useRelativePath option. It is dangerously and break url when you use multiple entry points.
  • drop support for webpack < 4

v2.0.0

5 years ago

2018-08-21

Code Refactoring

  • defaults: update to latest webpack-defaults (#268) (687f422)

BREAKING CHANGES

  • defaults: Enforces engines of "node": ">=6.9.0 < 7.0.0 || >= 8.9.0"

v1.1.11

6 years ago

2018-03-01

Reverts

  • index: context takes precedence over issuer.context (options.useRelativePath) (#260) (e73131f)

v1.1.10

6 years ago

2018-02-26

Bug Fixes

  • package: add webpack >= 4 (peerDependencies) (#255) (3a6a7a1)

v1.1.9

6 years ago

2018-02-21

Bug Fixes

  • index: handle protocol URL's correctly (options.publicPath) (#253) (54fa5a3)
  • index: use path.posix for platform consistency (#254) (2afe0af)

v1.1.8

6 years ago

2018-02-20

Bug Fixes

  • index: context takes precedence over issuer.context (options.useRelativePath) (3b071f5)
  • index: don't append outputPath to the original url (options.outputPath {Function}) (4c1ccaa)
  • index: normalize and concat paths via path.join() (26e47ca)

v1.1.7

6 years ago

2018-02-19

Bug Fixes

  • index: don't concat options.outputPath and options.publicPath (#246) (98bf052)

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