prettier-loader
Advanced tools
Comparing version 3.2.0 to 3.3.0
{ | ||
"name": "prettier-loader", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"description": "webpack prettier loader", | ||
@@ -5,0 +5,0 @@ "main": "prettier-loader.js", |
@@ -66,2 +66,4 @@ const fs = require('fs'); | ||
const loadedFiles = new Set(); | ||
module.exports = async function(source, map) { | ||
@@ -85,3 +87,3 @@ this.cacheable(); | ||
const { skipRewritingSource, ...config } = await getConfig( | ||
const { skipRewritingSource, ignoreInitial, ...config } = await getConfig( | ||
this.resourcePath, | ||
@@ -91,2 +93,7 @@ loaderUtils.getOptions(this) | ||
if (!!ignoreInitial && !loadedFiles.has(this.resourcePath)) { | ||
loadedFiles.add(this.resourcePath); | ||
return callback(null, source, map); | ||
} | ||
let prettierSource; | ||
@@ -93,0 +100,0 @@ try { |
@@ -155,2 +155,6 @@ # prettier-loader | ||
skipRewritingSource: false, | ||
// skip prettifying file at startup. | ||
// if true, prettier will be triggered after the modification of a file | ||
ignoreInitial: false, | ||
}, | ||
@@ -166,3 +170,3 @@ } | ||
If ou work with HTML preprocessor (Twig, EJS, Nunjucks, ...), you may want to process the output stream. | ||
If you work with HTML preprocessor (Twig, EJS, Nunjucks, ...), you may want to process the output stream. | ||
Still you don't want the input template to be rewritten with the output. | ||
@@ -169,0 +173,0 @@ In that case, you'll need to tell the loader to keep the source file unchanged. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14580
96
258
0