Skip to content

Commit

Permalink
build: remove Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
calimanco committed Dec 26, 2020
1 parent 6585fe6 commit 05c708b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,32 @@ const libraryName = 'promise-polyfill-plus'
export default {
input: `src/${libraryName}.ts`,
output: [
{ file: pkg.main, name: camelCase(libraryName), format: 'umd', sourcemap: true },
{ file: pkg.module, format: 'es', sourcemap: true },
{
file: pkg.main,
name: camelCase(libraryName),
format: 'umd',
sourcemap: true
},
{ file: pkg.module, format: 'es', sourcemap: true }
],
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [],
watch: {
include: 'src/**',
include: 'src/**'
},
plugins: [
// Allow json resolution
json(),
// Compile TypeScript files
typescript({ useTsconfigDeclarationDir: true }),
typescript({
useTsconfigDeclarationDir: true,
tsconfig: 'tsconfig.json',
tsconfigOverride: {
compilerOptions: {
removeComments: true
}
}
}),
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs(),
// Allow node_modules resolution, so you can use 'external' to control
Expand All @@ -35,6 +48,6 @@ export default {
resolve(),

// Resolve source maps to the original source
sourceMaps(),
],
sourceMaps()
]
}

0 comments on commit 05c708b

Please sign in to comment.