Skip to content

Commit

Permalink
Support packageOptions.rollup.plugins (#3123)
Browse files Browse the repository at this point in the history
* fix: support packageOptions.rollup.plugins

* Update local.ts

* Update local-install.ts
  • Loading branch information
haruhihi committed Apr 29, 2021
1 parent 1b33af5 commit 3701201
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions snowpack/src/sources/local-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export async function installPackages({
stats: false,
rollup: {
plugins: [
...(installOptions?.rollup?.plugins ?? []),
{
name: 'esinstall:snowpack',
async load(id: string) {
Expand Down
3 changes: 3 additions & 0 deletions snowpack/src/sources/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,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;
}
}
const installResult = await installPackages({
config,
Expand Down

1 comment on commit 3701201

@vercel
Copy link

@vercel vercel bot commented on 3701201 Apr 29, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.