Skip to content

Commit

Permalink
DRY extensions in config
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Oct 23, 2020
1 parent 4a1de69 commit 28ab48e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/gatsby-cli/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ function excludeDevTools() {
}
}

const extensions = [`.mjs`, `.js`, `.json`, `.node`, `.ts`, `.tsx`]

export default {
input: `src/reporter/loggers/ink/index.tsx`,
output: {
Expand All @@ -41,7 +43,7 @@ export default {
excludeDevTools(),
json(),
babel({
extensions: [`.js`, `.jsx`, `.es6`, `.es`, `.mjs`, `.ts`, `.tsx`] ,
extensions,
babelHelpers: `bundled`,
skipPreflightCheck: true,
exclude: `node_modules/**`,
Expand All @@ -66,7 +68,7 @@ export default {
]
}),
resolve({
extensions: [`.mjs`, `.js`, `.json`, `.node`, `.ts`, `.tsx`],
extensions,
dedupe: [ `react`, `ink` ]
}),
commonjs(),
Expand Down

0 comments on commit 28ab48e

Please # to comment.