You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup plugin to concatenate files/content to the generated output. This plugin would enable the user to concatenate files to the output or any other file in general.
Install
// yarn
yarn add rollup-plugin-concatfiles
// npm
npm i rollup-plugin-concatfiles
Usage
// rollup.config.jsimport{concatFiles}from"rollup-plugin-concatfiles";exportdefault[{input: "testUtils/core.js",output: {file: "dist/test-1.js",format: "iife",sourceMap: true},plugins: [concatFiles({files: {"dist/test-1.js": {banner:["Add your banner content"],concatFiles:['license.txt','dist/test-1.js'],footer:["Add your footer content"]},"dist/temp.js": {banner:[SOME_FILE_PATH],concatFiles:['src/core.js'],footer:[SOME_FILE_PATH]}}})]}];
In the above mentioned example dist/test-1.js will be the output generated by rollup and concatFiles plugin will accumulate all the content mentioned under the files key & dump that into dist/test-1.js. IMPORTANT: Old content will be replaced with the concatenated content.
rollup-plugin-concatfiles can be used to modify content of build file as well as other files.
Note: Banner can be an array of normal strings or file paths (in the form of string) or both. Similarly for footer.