Skip to content

Commit

Permalink
feat: renew rollup config file #41 (#42)
Browse files Browse the repository at this point in the history
* feat: renew rollup config file #41 (#42)
  • Loading branch information
lvfangren authored May 4, 2021
1 parent 12e9212 commit 802b474
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/features/rollup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const setup: FeatureSetup = async context => {

addDevDeps([
'rollup',
'rollup-plugin-babel',
'rollup-plugin-node-resolve',
'rollup-plugin-commonjs',
'@rollup/plugin-babel',
'@rollup/plugin-node-resolve',
'@rollup/plugin-commonjs',
'rollup-plugin-sourcemaps'
])

Expand Down
10 changes: 5 additions & 5 deletions src/features/rollup/templates/rollup.config.ts.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'
import babel from 'rollup-plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import babel from '@rollup/plugin-babel'
import sourceMaps from 'rollup-plugin-sourcemaps'
import pkg from './package.json'

Expand All @@ -16,13 +16,13 @@ export default {
plugins: [
// Allows node_modules resolution
// https://github.com/rollup/rollup-plugin-node-resolve#usage
resolve(),
nodeResolve(),
// Allow bundling cjs modules. Rollup doesn't understand cjs
commonjs(),
// Compile TypeScript/JavaScript files
babel({ extensions, include: ['src/**/*'], runtimeHelpers: true }),
babel({ extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.ts', '.tsx'], include: ['src/**/*'], babelHelpers: 'runtime' }),

// Resolve source maps to the original source
sourceMaps()
Expand Down

0 comments on commit 802b474

Please sign in to comment.