Skip to content

Commit

Permalink
fix(build): remove comments from emitted files
Browse files Browse the repository at this point in the history
  • Loading branch information
niklashigi committed Dec 25, 2017
1 parent 43197d7 commit 3a94dd3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import typescript from 'rollup-plugin-typescript'

const removeComments = () => ({
transform(code, id) {
code = code.replace(/\/\*[^*]+\*\/\s+/g, '')
return { code, map: { mappings: '' } }
}
})

export default {
input: 'src/index.ts',
plugins: [
typescript({
typescript: require('typescript'),
})
}),
removeComments(),
],
output: [
{
Expand Down

0 comments on commit 3a94dd3

Please sign in to comment.