Skip to content

Commit

Permalink
use MagicString.length()
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jun 4, 2018
1 parent de83598 commit 55ac656
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Chunk.ts
Expand Up @@ -799,7 +799,7 @@ export default class Chunk {
this.renderedModules[module.id] = {
renderedExports,
removedExports,
renderedLength: source.toString().length,
renderedLength: source.length(),
originalLength: module.originalCode.length
};

Expand Down Expand Up @@ -844,7 +844,7 @@ export default class Chunk {

getRenderedSourceLength() {
if (this.renderedSourceLength !== undefined) return this.renderedSourceLength;
return (this.renderedSourceLength = this.renderedSource.toString().length);
return (this.renderedSourceLength = this.renderedSource.length());
}

/*
Expand Down

0 comments on commit 55ac656

Please sign in to comment.