Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need an explanation on rollup.config.js #4

Open
blackjyn opened this issue Dec 30, 2021 · 0 comments
Open

Need an explanation on rollup.config.js #4

blackjyn opened this issue Dec 30, 2021 · 0 comments

Comments

@blackjyn
Copy link

Can you please explain what does this code do:

import pkg from './package.json';

const name = pkg.name
	.replace(/^(@\S+\/)?(svelte-)?(\S+)/, '$3')
	.replace(/^\w/, m => m.toUpperCase())
	.replace(/-\w/g, m => m[1].toUpperCase());

and this:

output: [
	{ file: pkg.module, 'format': 'es' },
	{ file: pkg.main, 'format': 'umd', name }
],

I really need to know whats goin on under the hood. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant