Steps to reproduce
-
Project Structure
examples/import-meta/
├── a.ts
├── index.ts
├── farm.config.ts
└── package.json
-
index.ts
console.log(new URL("./foo.txt", import.meta.url));
function loadA() {
import("./a").then((res) => {
console.log("res:", res);
});
}
-
a.ts
export const msg = "hello from a";
-
farm.config.ts
(Make sure to explicitly set both index.ts and a.ts as entries.)
export default {
input: {
main: "./index.ts",
a: "./a.ts",
},
};
-
Run the Build
Reproduce link
No response
What is actually happening?
Expected to optimize the entry type, but an error occurred:
thread '<unnamed>' panicked at crates/core/src/module/module_group.rs:47:51:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Rayon: detected unexpected panic; aborting
System Info
System:
OS: macOS 26.1
CPU: (8) arm64 Apple M1 Pro
Memory: 78.56 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.1 - /Users/ming07/.nvm/versions/node/v22.17.1/bin/node
Yarn: 1.22.5 - /Users/ming07/.yarn/bin/yarn
npm: 10.9.2 - /Users/ming07/.nvm/versions/node/v22.17.1/bin/npm
pnpm: 9.12.2 - /Users/ming07/Library/pnpm/pnpm
Deno: 1.23.2 - /Users/ming07/.deno/bin/deno
Watchman: 2023.04.10.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 143.0.7499.41
Safari: 26.1
npmPackages:
@farmfe/core: workspace:* => 2.0.0-beta.7