How to use the shimport/package.json.version function in shimport

To help you get started, we’ve selected a few shimport examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sveltejs / sapper / src / core / create_compilers / RollupResult.ts View on Github external
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)
		};
	}
github sveltejs / sapper / src / api / utils / copy_shimport.ts View on Github external
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'))
	);
}

shimport

Shim for dynamic import()

MIT
Latest version published 4 years ago

Package Health Score

57 / 100
Full package analysis

Popular shimport functions