svelte-preprocess
Advanced tools
Comparing version 4.6.2 to 4.6.3
@@ -0,1 +1,10 @@ | ||
## [4.6.3](https://github.com/sveltejs/svelte-preprocess/compare/v4.6.2...v4.6.3) (2021-01-21) | ||
### Bug Fixes | ||
* ๐ make postcss config error explicit ([21e3086](https://github.com/sveltejs/svelte-preprocess/commit/21e30861ccc6d6c6b80cd9aad4a81b9e29a96c5e)), closes [#298](https://github.com/sveltejs/svelte-preprocess/issues/298) | ||
## [4.6.2](https://github.com/sveltejs/svelte-preprocess/compare/v4.6.1...v4.6.2) (2021-01-21) | ||
@@ -2,0 +11,0 @@ |
@@ -49,9 +49,15 @@ "use strict"; | ||
return { | ||
plugins: loadedConfig.plugins, | ||
// `postcss-load-config` puts all other props in a `options` object | ||
...loadedConfig.options, | ||
error: null, | ||
config: { | ||
plugins: loadedConfig.plugins, | ||
// `postcss-load-config` puts all other props in a `options` object | ||
...loadedConfig.options, | ||
}, | ||
}; | ||
} | ||
catch (e) { | ||
return null; | ||
return { | ||
config: null, | ||
error: e, | ||
}; | ||
} | ||
@@ -64,3 +70,3 @@ } | ||
fileConfig = await getConfigFromFile(options); | ||
options = { ...options, ...fileConfig }; | ||
options = { ...options, ...fileConfig.config }; | ||
} | ||
@@ -70,4 +76,4 @@ if (options.plugins || options.syntax || options.parser) { | ||
} | ||
if (fileConfig === null) { | ||
console.error(`[svelte-preprocess] PostCSS configuration was not passed. If you expect to load it from a file make sure to install "postcss-load-config" and try again.`); | ||
if (fileConfig.error !== null) { | ||
console.error(`[svelte-preprocess] PostCSS configuration was not passed or is invalid. If you expect to load it from a file make sure to install "postcss-load-config" and try again.\n\n${fileConfig.error}`); | ||
} | ||
@@ -74,0 +80,0 @@ return { code: content, map, dependencies: [] }; |
{ | ||
"name": "svelte-preprocess", | ||
"version": "4.6.2", | ||
"version": "4.6.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117159
1759