Skip to content

Commit

Permalink
fix: add missing deps & fixes caught by tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jan 20, 2021
1 parent 3bc776b commit 3629e78
Show file tree
Hide file tree
Showing 3 changed files with 895 additions and 30 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
},
"dependencies": {
"@storybook/node-logger": "^6.1.14",
"postcss": "^7.0.35"
"css-loader": "^3.6.0",
"postcss": "^7.0.35",
"postcss-loader": "npm:@phated/postcss-loader@4.2.0-phated.2",
"style-loader": "^1.3.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export const webpack = (
webpackConfig: Configuration = {},
options: { postcss?: PostcssFactory },
): Configuration => {
const postcssFactory = options.postcss ?? postcss;
const postcssFactory = options?.postcss ?? postcss;
const { version } = postcssFactory();

logger.info(`=> Using PostCSS preset with version ${version}`);
logger.info(`=> Using PostCSS preset with postcss@${version}`);

return {
...webpackConfig,
Expand Down
Loading

0 comments on commit 3629e78

Please sign in to comment.