-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for custom named exports (#452)
- Loading branch information
1 parent
97f6c1f
commit 35112ac
Showing
10 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
test/integration/config-named-exports/expected-install/import-map.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"imports": { | ||
"mock-test-package": "./mock-test-package.js" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
test/integration/config-named-exports/expected-install/mock-test-package.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var entrypoint = { | ||
export1: 'foo', | ||
export2: 'bar', | ||
}; | ||
var entrypoint_1 = entrypoint.export1; | ||
var entrypoint_2 = entrypoint.export2; | ||
|
||
export { entrypoint_1 as export1, entrypoint_2 as export2 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- snowpack installing... | ||
✔ snowpack install complete. | ||
⦿ web_modules/ size gzip brotli | ||
└─ mock-test-package.js XXXX KB XXXX KB XXXX KB |
4 changes: 4 additions & 0 deletions
4
test/integration/config-named-exports/node_modules/mock-test-package/entrypoint.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
test/integration/config-named-exports/node_modules/mock-test-package/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"description": "Handle installOptions.namedExports", | ||
"scripts": { | ||
"TEST": "node ../../../pkg/dist-node/index.bin.js" | ||
}, | ||
"snowpack": { | ||
"install": ["mock-test-package"], | ||
"installOptions": { | ||
"namedExports": ["mock-test-package"] | ||
} | ||
}, | ||
"dependencies": { | ||
"mock-test-package": "^1.0.0" | ||
} | ||
} |