Skip to content

Commit

Permalink
Remove path resolving in the config file
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 12, 2021
1 parent 984cd02 commit 1dfccab
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/optimizers/cssnano/src/CSSNanoOptimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,11 @@ export default (new Optimizer({
packageKey: 'cssnano',
},
);
// TODO copied from stylus package. make this a utility function
if (configFile) {
let isJavascript = path.extname(configFile.filePath) === '.js';
if (isJavascript) {
config.shouldInvalidateOnStartup();
}

// Resolve relative paths from config file
if (configFile.contents.paths) {
configFile.contents.paths = configFile.contents.paths.map(p =>
path.resolve(path.dirname(configFile.filePath), p),
);
}

config.setResult(configFile.contents);
}
},
Expand Down

0 comments on commit 1dfccab

Please sign in to comment.