Skip to content

Commit 229a257

Browse files
committed
fix(build): fix various rebuild errors
Remove duplicate file watcher on `extensionsDir` Only read user cms config when it changes Greatly improve rebuild time fixes #7, closes #9, fixes #10
1 parent c4107f2 commit 229a257

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: src/module.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export default function NetlifyCmsModule(moduleOptions) {
2626
const config = configManager.config;
2727

2828
const ADMIN_PATH = config.adminPath;
29-
const EXTENSIONS_DIR = config.extensionsDir;
3029
const BUILD_DIR = config.buildDir;
3130

3231
// This will be called once when builder started
@@ -119,10 +118,7 @@ export default function NetlifyCmsModule(moduleOptions) {
119118
});
120119

121120
// Start watching config file
122-
const patterns = [
123-
Utils.r(configManager.cmsConfigFile.fileName),
124-
Utils.r(EXTENSIONS_DIR)
125-
];
121+
const patterns = [Utils.r(configManager.cmsConfigFile.fileName)];
126122

127123
const options = {
128124
...this.options.watchers.chokidar,
@@ -131,7 +127,6 @@ export default function NetlifyCmsModule(moduleOptions) {
131127

132128
const refreshFiles = _.debounce(() => {
133129
configManager.cmsConfigFile.readFile();
134-
debug(`Rebuilding...`);
135130
this.nuxt.renderer.netlifyWebpackDevMiddleware.invalidate();
136131
}, 200);
137132

0 commit comments

Comments
 (0)