-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly resolve module exports when running
crackle dev
(#129)
- Loading branch information
Showing
10 changed files
with
103 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@crackle/core': patch | ||
--- | ||
|
||
Correctly resolve module exports when running `crackle dev` | ||
|
||
This fixes an issue where `crackle dev` would not resolve an entry's exports when the entry re-exported from another module using `export * from ...` syntax. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# managed by crackle | ||
/cli | ||
/dist | ||
/re-export | ||
# end managed by crackle |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from '../'; |
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
25 changes: 25 additions & 0 deletions
25
tests/__snapshots__/dev/dev-entries/dist/re-export.ts.snap
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,25 @@ | ||
/* #region dist/re-export.cjs */ | ||
require("../../../node_modules/.pnpm/[email protected]/node_modules/tsm/require.js"); | ||
|
||
module.exports = require("../src/entries/re-export.ts"); | ||
/* #endregion */ | ||
|
||
|
||
/* #region dist/re-export.d.ts */ | ||
export * from "../src/entries/re-export"; | ||
export { default } from "../src/entries/re-export"; | ||
/* #endregion */ | ||
|
||
|
||
/* #region dist/re-export.mjs */ | ||
import { createRequire } from "module"; | ||
|
||
const require = createRequire(import.meta.url); | ||
|
||
require("../../../node_modules/.pnpm/[email protected]/node_modules/tsm/require.js"); | ||
|
||
const _mod = require("../src/entries/re-export.ts"); | ||
|
||
export const something = _mod.something; | ||
export default _mod.default; | ||
/* #endregion */ |