diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-12-29 07:54:55 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-12-29 07:54:55 +0800 |
| commit | 73ced5e156cb7b8588c7e24fcee77e7f3e4061c5 (patch) | |
| tree | 28d79e72e7bfecaec1b72a737849b2319ebbd765 /node_modules/postcss-loader/dist | |
| parent | 5f4101110c41a3e0fdcbdd30e5789bce57a2fe2a (diff) | |
package update
Diffstat (limited to 'node_modules/postcss-loader/dist')
| -rw-r--r-- | node_modules/postcss-loader/dist/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/node_modules/postcss-loader/dist/index.js b/node_modules/postcss-loader/dist/index.js index d4c1c91b..c71ab296 100644 --- a/node_modules/postcss-loader/dist/index.js +++ b/node_modules/postcss-loader/dist/index.js @@ -106,7 +106,11 @@ async function loader(content, sourceMap, meta) { // Nothing } if (pkg) { - if (!pkg.dependencies.postcss && !pkg.devDependencies.postcss) { + const { + dependencies = {}, + devDependencies = {} + } = pkg; + if (!dependencies.postcss && !devDependencies.postcss) { this.emitWarning(new Error("Add postcss as project dependency. postcss is not a peer dependency for postcss-loader. " + "Use `npm install postcss` or `yarn add postcss`")); } else { hasExplicitDependencyOnPostCSS = true; |
