Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
to_json(manifest_data: ManifestData, dirs: Dirs): BuildInfo {
// TODO extract_css has side-effects that don't belong
// in a method called to_json
return {
bundler: 'rollup',
shimport: require('shimport/package.json').version,
assets: this.assets,
css: extract_css(this, manifest_data.components, dirs, this.sourcemap)
};
}
export function copy_shimport(dest: string) {
const shimport_version = require('shimport/package.json').version;
fs.writeFileSync(
`${dest}/client/shimport@${shimport_version}.js`,
fs.readFileSync(require.resolve('shimport/index.js'))
);
}