Skip to content

Commit 001fea9

Browse files
committed
feat: deprecate createConfig
1 parent 7920977 commit 001fea9

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

README.md

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ coffee
6767
json
6868
css
6969
wasm
70+
as
7071
visualizer
7172
```
7273

@@ -113,39 +114,3 @@ For adding extra plugins, you can pass them in array to the second argument
113114
import multyentry from "@rollup/plugin-multi-entry"
114115
createPlugins(["ts"], [multyentry()])
115116
```
116-
117-
---
118-
119-
### createConfig (not recommend)
120-
121-
This is a simple wrapper around the rollup config, so it is recommended to use the default Rollup syntax.
122-
123-
You can use `createConfig` to create the configs you need.
124-
125-
```ts
126-
createConfig(
127-
input: string | Array<string> = "src/main.ts", // bundle's input(s) file(s)
128-
output_dir: string = "dist", // where the bundle is stored
129-
output_format = "cjs", // output format (e.g. `cjs`, `es`, etc)
130-
externals: Array<string> = ["atom", "electron"], // libraries you want to be external
131-
plugins = createPlugins() // pass the plugins you created using `createPlugins()`
132-
)
133-
```
134-
135-
An example that uses `createConfig`:
136-
137-
```js
138-
const { createPlugins, createConfig } = require("rollup-plugin-atomic")
139-
140-
const plugins = createPlugins(["ts", "babel"])
141-
142-
const config = createConfig("src/main.ts", "dist", "cjs", ["atom", "electron", "node-pty-prebuilt-multiarch"], plugins)
143-
144-
module.exports = config
145-
```
146-
147-
You can create multiple configs using `createConfig` and export them as an array:
148-
149-
```js
150-
module.exports = [config1, config2]
151-
```

src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ export function createPlugins(
223223
return plugins
224224
}
225225

226+
/** @deprecated use default Rollup syntax - this function will be removed in the next major version */
226227
export function createConfig(
227228
input: string | Array<string> = "src/main.ts",
228229
output_dir: string = "dist",

0 commit comments

Comments
 (0)