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

Support packageOptions.rollup.plugins #3123

Merged
merged 3 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions snowpack/src/sources/local-install.ts
Expand Up @@ -52,6 +52,7 @@ export async function installPackages({
stats: false,
rollup: {
plugins: [
...(installOptions?.rollup?.plugins ?? []),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first ?. is useless

{
name: 'esinstall:snowpack',
async load(id: string) {
Expand Down
3 changes: 3 additions & 0 deletions snowpack/src/sources/local.ts
Expand Up @@ -575,6 +575,9 @@ export class PackageSourceLocal implements PackageSource {
if (config.packageOptions.namedExports !== undefined) {
installOptions.namedExports = config.packageOptions.namedExports;
}
if (config.packageOptions.rollup !== undefined) {
installOptions.rollup = config.packageOptions.rollup;
}
Copy link

@eytienne eytienne Apr 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the root cause of this bug seems to be that confusing redundancy between call site and function body

}
const installResult = await installPackages({
config,
Expand Down