File tree Expand file tree Collapse file tree 2 files changed +0
-42
lines changed Expand file tree Collapse file tree 2 files changed +0
-42
lines changed Original file line number Diff line number Diff line change @@ -172,32 +172,6 @@ It's to optimize output and skip similar files like `normalize.css` for example.
172172If this behavior is not what you want, just set this option to ` false ` to
173173disable it.
174174
175- #### ` addDependencyTo `
176-
177- Type: ` Object `
178- Default: null
179-
180- ** DEPRECATED.** _ If you are using postcss-import v8.2.0 & postcss-loader v1.0.0 or later, this is unnecessary._
181-
182- An object with ` addDependency() ` method, taking file path as an argument.
183- Called whenever a file is imported.
184- You can use it for hot-reloading in webpack ` postcss-loader ` like this:
185-
186- ``` js
187- postcss : function (webpack ) {
188- return [
189- require (' postcss-import' )({
190- addDependencyTo: webpack
191- /* Is equivalent to
192- onImport: function (files) {
193- files.forEach(this.addDependency)
194- }.bind(webpack)
195- */
196- })
197- ]
198- }
199- ```
200-
201175#### ` addModulesDirectories `
202176
203177Type: ` Array `
Original file line number Diff line number Diff line change @@ -64,22 +64,6 @@ function AtImport(options) {
6464 applyMedia ( bundle )
6565 applyStyles ( bundle , styles )
6666
67- if (
68- typeof options . addDependencyTo === "object" &&
69- typeof options . addDependencyTo . addDependency === "function"
70- ) {
71- console . warn ( [
72- "addDependencyTo is deprecated in favor of" ,
73- "result.messages.dependency; postcss-loader >= v1.0.0 will" ,
74- "automatically add your imported files to webpack's file watcher." ,
75- "For more information, see" ,
76- "https://github.com/postcss/postcss-import\
77- #dependency-message-support" ,
78- ] . join ( "\n" ) )
79- Object . keys ( state . importedFiles )
80- . forEach ( options . addDependencyTo . addDependency )
81- }
82-
8367 if ( typeof options . onImport === "function" ) {
8468 options . onImport ( Object . keys ( state . importedFiles ) )
8569 }
You can’t perform that action at this time.
0 commit comments