Skip to content

Commit

Permalink
Merge pull request #435 from leo60228/master
Browse files Browse the repository at this point in the history
Support silencing sourcemap warning
  • Loading branch information
mjeanroy authored May 23, 2020
2 parents bdfb09b + b770bc4 commit 07d945a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rollup-plugin-prettier.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,10 @@ export class RollupPluginPrettier {
return {code: output};
}

console.warn(`[${this.name}] Sourcemap is enabled, computing diff is required`);
console.warn(`[${this.name}] This may take a moment (depends on the size of your bundle)`);
if (defaultSourcemap !== 'silent') {
console.warn(`[${this.name}] Sourcemap is enabled, computing diff is required`);
console.warn(`[${this.name}] This may take a moment (depends on the size of your bundle)`);
}

const magicString = new MagicString(source);
const changes = diff.diffChars(source, output);
Expand Down

0 comments on commit 07d945a

Please sign in to comment.