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

Commit 16e2341

Browse files
refactor: drop support for webpack < 4
BREAKING CHANGE: drop support for webpack < 4
1 parent e5fe4e8 commit 16e2341

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
A file loader module for webpack
1616

17-
## Requirements
18-
19-
This module requires a minimum of Node v6.9.0 and works with Webpack v3 and Webpack v4.
20-
2117
## Getting Started
2218

2319
To begin, you'll need to install `file-loader`:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"dist"
3636
],
3737
"peerDependencies": {
38-
"webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
38+
"webpack": "^4.0.0"
3939
},
4040
"dependencies": {
4141
"loader-utils": "^1.0.2",

src/index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* eslint-disable
2-
multiline-ternary,
3-
*/
41
import path from 'path';
52

63
import loaderUtils from 'loader-utils';
@@ -17,10 +14,7 @@ export default function loader(content) {
1714

1815
validateOptions(schema, options, 'File Loader');
1916

20-
const context =
21-
options.context ||
22-
this.rootContext ||
23-
(this.options && this.options.context);
17+
const context = options.context || this.rootContext;
2418

2519
const url = loaderUtils.interpolateName(this, options.name, {
2620
context,

0 commit comments

Comments
 (0)