4.0.3 • Published 9 months ago

@repodog/rollup-config v4.0.3

Weekly downloads
23
License
MIT
Repository
github
Last release
9 months ago

@repodog/rollup-config

The Repodog Rollup config.

npm version License: MIT

Install package and peer dependency

# terminal
npm install @repodog/rollup-config rollup  --save-dev

Rollup uses Babel or SWC for code compilation so you will also need to install @repodog/babel-config or @repodog/swc-config and the relevant peer dependencies.

Use package

// package.json
{
  "scripts": {
    "build": "rollup -c ./rollup.config.cjs"
  }
}

With Babel

// rollup.config.cjs
const rollupConfig = require('@repodog/rollup-config');
const babelConfig = require('@repodog/babel-config/rollup');
const { babel: babelPlugin } = require('@rollup/plugin-babel');

module.exports = {
  ...rollupConfig({ compiler: babelPlugin(babelConfig) }),
};

With SWC

// rollup.config.cjs
const rollupConfig = require('@repodog/rollup-config');
const swcConfig = require('@repodog/swc-config');
const swcPlugin = require('@rollup/plugin-swc');

module.exports = {
  ...rollupConfig({ compiler: swcPlugin({ swc: swcConfig.ts }) }),
  // or
  ...rollupConfig({ compiler: swcPlugin({ swc: swcConfig.js }) }),
};

Environment variables

MODULE_SYSTEM = 'esm' || 'cjs'

Sets output.format, directory name within ./dist output, and the extension of the bundled output file. Default 'esm'.

NODE_ENV = 'production' || 'development' || 'test'

When set to 'production', terser mangles and compresses, the bundle analyser runs, and source maps are omitted.

You cam also use the environment variables outlined in @repodog/babel-config or @repodog/swc-config to control what is output.

4.0.3

9 months ago

4.0.1

9 months ago

1.2.2

1 year ago

1.2.0

1 year ago

1.2.1

1 year ago

1.1.9

1 year ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.1

2 years ago

1.0.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.0-alpha.0

2 years ago

1.0.1-alpha.0

2 years ago

1.0.2-alpha.0

2 years ago

1.0.0-alpha.0

2 years ago

0.3.28

5 years ago

0.3.27

5 years ago

0.3.25

6 years ago

0.3.24

6 years ago

0.3.23

6 years ago

0.3.22

6 years ago

0.3.21

6 years ago

0.3.20

6 years ago

0.3.18

6 years ago

0.3.17

6 years ago

0.3.16

6 years ago

0.3.15

6 years ago

0.3.12

6 years ago

0.3.10

6 years ago

0.2.26

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago