Skip to content

Commit

Permalink
Add type annotation for CSSNanoOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 7, 2021
1 parent dce78fb commit e74fb69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/optimizers/cssnano/src/CSSNanoOptimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import SourceMap from '@parcel/source-map';
import {Optimizer} from '@parcel/plugin';
import postcss from 'postcss';
import cssnano from 'cssnano';
import type {CSSNanoOptions} from 'cssnano'; // TODO the type is based on cssnano 4
import {loadConfig} from '@parcel/utils';
import path from 'path';

Expand All @@ -25,7 +26,7 @@ export default (new Optimizer({
);
}

const userConfig =
const userConfig: CSSNanoOptions =
(await loadConfig(
options.inputFS,
path.join(options.entryRoot, 'index.css'),
Expand Down

0 comments on commit e74fb69

Please sign in to comment.