
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
rollup-plugin-copy2
Advanced tools
Rollup plugin to copy additional assets to the build directory.
Rollup plugin to copy additional assets to the build directory.
This plugin actually does not copy assets by default but adds them to the resulting bundle so they could be accessed by other plugins (for example by the rollup-plugin-zip).
The actual copying is made by the Rollup itself.
npm i -D rollup-plugin-copy2
// rollup.config.js
import {copy} from 'rollup-plugin-copy2'
export default {
input: 'index.js',
output: {
dir: 'dist',
format: 'es',
},
plugins: [
copy({
assets: [
'README.md',
['data.txt', 'assets/data.txt'],
]
}),
],
}
(string | [string, string])[]
An array of assets to copy. Each entry can be
string
that contains a relative path to the source filenode_modules/static-deps/**/*.css
[string, string]
that contains relative paths to the source (not glob ones) and destination files.If an entry is a single string then the destination file path will be equal to it (relative to the output directory).
boolean?
Do not emit files with Rollup. Use this option with outputDirectory if you only want to copy files to a specific directory.
string?
A path to the additional output directory in case you want to write copied files on disk.
If not set, the files are only emitted to the others plugins.
FAQs
Rollup plugin to copy additional assets to the build directory.
The npm package rollup-plugin-copy2 receives a total of 107 weekly downloads. As such, rollup-plugin-copy2 popularity was classified as not popular.
We found that rollup-plugin-copy2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.