File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ You should also install the peer dependencies:
2525Create a ` rollup.config.js ` file at the root of the project with the following content. See API section for more details
2626
2727``` js
28- const { createPlugins , createConfig } = requore (" rollup-plugin-atomic" );
28+ const { createPlugins , createConfig } = require (" rollup-plugin-atomic" );
2929
30- const plugins = createPlugins ([" js" ], true );
30+ const plugins = createPlugins ([" ts " , " js" ], true );
3131
3232const config = createConfig (
33- " src/x-terminal.js " ,
33+ " src/main.ts " ,
3434 " dist" ,
3535 " cjs" ,
3636 [" atom" , " electron" , " node-pty-prebuilt-multiarch" ],
@@ -67,3 +67,24 @@ You can create multiple configs using `createConfig` and export them as an array
6767``` js
6868module .exports = [config1, config2]
6969```
70+
71+ ## Only using createPlugins:
72+
73+ you can only use ` createPlugins ` and then export your config with the typical rollup style:
74+ ``` js
75+ const { createPlugins } = require (" rollup-plugin-atomic" );
76+
77+ const plugins = createPlugins ([" ts" , " js" ], true );
78+
79+ module .exports = {
80+ input: " src/main.ts" ,
81+ output: [
82+ {
83+ dir: " dist" ,
84+ format: " cjs" ,
85+ sourcemap: true ,
86+ },
87+ ],
88+ plugins: plugins,
89+ }
90+ ```
You can’t perform that action at this time.
0 commit comments