fix: specifier subpath parse error #8
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this case was found by web-infra-dev/rspack#10127
× Module not found: Can't resolve 'webpack/hot/emitter.js' in '/Users/bytedance/git/problem/pnp-repro/.yarn/__virtual__/webpack-dev-server-virtual-e3e5db5beb/0/cache/webpack-dev-server-npm-5.2.0-baf75bbb61-87b7acc194.zip/node_modules/webpack-dev-server/client' ╭─[46:23] 44 │ /* global __resourceQuery, __webpack_hash__ */ /// <reference types="webpack/module" /> 45 │ import webpackHotLog from "webpack/hot/log.js"; 46 │ import hotEmitter from "webpack/hot/emitter.js"; · ──────────────────────── 47 │ import socket from "./socket.js"; 48 │ import { formatProblem, createOverlay } from "./overlay.js"; ╰────root cause
calling
parse_bare_identifierwithwebpack/hot/emitter.jsexpect returns
("webpack", Some("hot/emitterjs"))actual returns
("webpack", Some("hot"))