Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function build({out, options, reporter}: BuilderOptions): Promise {
const readFromTypes = path.join(out, 'dist-types', 'index.d.ts');
const writeToTypes = path.join(out, 'dist-types');
const writeToTypesBundled = path.join(writeToTypes, 'index.d.ts');
const result = await rollup({
input: readFromTypes,
plugins: [rollupPluginDts()],
});
rimraf.sync(writeToTypes);
await result.write({
file: writeToTypesBundled,
format: 'esm',
});
reporter.created(writeToTypesBundled);
}
export async function build({ out, options, reporter }) {
const readFromTypes = path.join(out, 'dist-types', 'index.d.ts');
const writeToTypes = path.join(out, 'dist-types');
const writeToTypesBundled = path.join(writeToTypes, 'index.d.ts');
const result = await rollup({
input: readFromTypes,
plugins: [rollupPluginDts()],
});
rimraf.sync(writeToTypes);
await result.write({
file: writeToTypesBundled,
format: 'esm',
});
reporter.created(writeToTypesBundled);
}