Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Releases: webpack-contrib/file-loader

v4.1.0

18 Jul 11:06
Compare
Choose a tag to compare

4.1.0 (2019-07-18)

Features

v4.0.0

05 Jun 12:59
Compare
Choose a tag to compare

4.0.0 (2019-06-05)

chore

BREAKING CHANGES

  • deps: minimum required nodejs version is 8.9.0

v3.0.1

20 Dec 17:38
Compare
Choose a tag to compare

3.0.1 (2018-12-20)

Bug Fixes

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

v3.0.0

20 Dec 15:05
Compare
Choose a tag to compare

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

21 Aug 19:47
Compare
Choose a tag to compare

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

01 Mar 22:57
Compare
Choose a tag to compare

2018-03-01

Reverts

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

v1.1.10

26 Feb 21:50
Compare
Choose a tag to compare

2018-02-26

Bug Fixes

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

v1.1.9

21 Feb 19:16
Compare
Choose a tag to compare

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

20 Feb 19:45
Compare
Choose a tag to compare

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

19 Feb 18:32
Compare
Choose a tag to compare

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