Skip to content

Commit

Permalink
Support silencing sourcemap warning
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed May 20, 2020
1 parent a10ae6b commit b770bc4
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 b770bc4

Please sign in to comment.