Skip to content

Commit d13e6c8

Browse files
committed
fix: fix deps
1 parent d97dd50 commit d13e6c8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const isCSS = (name) => /\.css$/.test(name)
1616
// const strip = (str) => str.replace(/\/$/, '')
1717

1818
class CssUrlRelativePlugin {
19-
2019
constructor (options) {
2120
this.options = options || {}
2221
this.plugin = {
@@ -65,13 +64,13 @@ class CssUrlRelativePlugin {
6564
done()
6665
}
6766

68-
applyCompilation = (compilation) => {
67+
applyCompilation (compilation) {
6968
// webpack version <= 4
7069
if (webpackMajorVersion <= 4) {
71-
compilation.hooks.optimizeChunkAssets.tapAsync(plugin, (chunks, done) => {
70+
compilation.hooks.optimizeChunkAssets.tapAsync(this.plugin, (chunks, done) => {
7271
this.fixCssUrl(compilation, chunks, done)
7372
})
74-
return;
73+
return
7574
}
7675

7776
// webpack verion = 5
@@ -88,7 +87,7 @@ class CssUrlRelativePlugin {
8887

8988
apply (compiler) {
9089
// use compilation instead of this-compilation, just like other plugins do
91-
compiler.hooks.compilation.tap(this.plugin, this.applyCompilation)
90+
compiler.hooks.compilation.tap(this.plugin, this.applyCompilation.bind(this))
9291
}
9392
}
9493

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"mocha": "^3.0.2",
5151
"npm-ensure": "^1.0.0",
5252
"nyc": "11.x",
53-
"standard": "^8.2.0",
53+
"standard": "11.x",
5454
"webpack": "^4.10.2"
5555
},
5656
"repository": {

0 commit comments

Comments
 (0)