Skip to content

Commit 0c8c07d

Browse files
michael-ciniawskyai
authored andcommitted
Watch Config (postcss.config.js) (#161)
* Watch config file * Update postcss-load-config v1.0.0..v1.1.0
1 parent 526df91 commit 0c8c07d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module.exports = function (source, map) {
4848
var options = params.plugins || loader.options.postcss;
4949
var pack = params.pack;
5050
var callback = loader.async();
51+
5152
var configPath;
5253

5354
if (params.config) {
@@ -72,6 +73,9 @@ module.exports = function (source, map) {
7273
}
7374
}).then(function (config) {
7475
if ( !config ) config = { };
76+
77+
if ( config.file ) loader.addDependency(config.file);
78+
7579
var plugins = config.plugins || [];
7680

7781
var opts = assign({}, config.options, {

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"name": "postcss-loader",
33
"version": "1.2.1",
44
"description": "PostCSS loader for webpack",
5-
"engines": {
6-
"node": ">=0.12",
7-
"npm": ">=3"
8-
},
5+
"engines": { "node": ">=0.12" },
96
"keywords": [
107
"webpack",
118
"loader",
@@ -19,8 +16,8 @@
1916
"dependencies": {
2017
"loader-utils": "^0.2.16",
2118
"object-assign": "^4.1.0",
22-
"postcss": "^5.2.8",
23-
"postcss-load-config": "^1.0.0"
19+
"postcss": "^5.2.9",
20+
"postcss-load-config": "^1.1.0"
2421
},
2522
"devDependencies": {
2623
"eslint": "^3.12.2",

0 commit comments

Comments
 (0)