Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier-loader

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-loader - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

2

package.json
{
"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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc