-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
100 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,12 +66,24 @@ export default (options = {}) => { | |
options.onImport(id) | ||
} | ||
|
||
const res = await loaders.process({ | ||
code, | ||
map: undefined, | ||
const loaderContext = { | ||
id, | ||
sourceMap | ||
}) | ||
sourceMap, | ||
dependencies: new Set(), | ||
warn: this.warn.bind(this), | ||
plugin: this | ||
} | ||
const res = await loaders.process( | ||
{ | ||
code, | ||
map: undefined | ||
}, | ||
loaderContext | ||
) | ||
|
||
for (const dep of loaderContext.dependencies) { | ||
this.addWatchFile(dep) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Tonours
|
||
} | ||
|
||
if (postcssLoaderOptions.extract) { | ||
extracted.set(id, res.extracted) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This produces an error:
[!] (postcss plugin) TypeError: _this.addWatchFile is not a function