Skip to content

Commit

Permalink
build: use sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jun 10, 2019
1 parent 53bbacc commit 655274d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ module.exports = {
},
],
],
sourceMaps: true,
};
5 changes: 3 additions & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ function buildFile(file, silent) {
});
}

const transformed = babel.transformFileSync(file, options).code;
const prettyCode = prettier.format(transformed, prettierConfig);
const transformed = babel.transformFileSync(file, options);
const prettyCode = prettier.format(transformed.code, prettierConfig);

fs.writeFileSync(destPath, prettyCode);
fs.writeFileSync(destPath + '.map', JSON.stringify(transformed.map));

silent ||
process.stdout.write(
Expand Down

0 comments on commit 655274d

Please sign in to comment.