-
-
Notifications
You must be signed in to change notification settings - Fork 625
Closed
Description
- Rollup Plugin Name: @rollup/plugin-node-resolve
- Rollup Plugin Version: 9.0.0
- Rollup Version: 2.22.2
- Operating System (or Browser): Macos
- Node Version: 12.6.2
- Link to reproduction (
⚠️ read below): https://repl.it/repls/BustlingImpracticalMice#input.js
Expected Behavior
# can be part of path instead hash usage, expecting node-resolve can handle this situation
Actual Behavior
# is split into two parts by the following code:
// strip hash and query params from import
const [withoutHash, hash] = importee.split('#');
const [importPath, params] = withoutHash.split('?');
const importSuffix = `${params ? `?${params}` : ''}${hash ? `#${hash}` : ''}`;
importee = importPath
So, require('es5-ext/string/#/contains') converts to es-ext/string/ with hash /contains.
Thus, error occurs:
[!] Error: Could not load /home/runner/BustlingImpracticalMice/node_modules/es5-ext/string/index.js#/contains (imported by node_modules/d/index.js): ENOENT: no such file or directory, open '/home/runner/BustlingImpracticalMice/node_modules/es5-ext/string/index.js#/contains'
Additional Information
package d source code
var isValue = require("type/value/is")
, isPlainFunction = require("type/plain-function/is")
, assign = require("es5-ext/object/assign")
, normalizeOpts = require("es5-ext/object/normalize-options")
, contains = require("es5-ext/string/#/contains");
As you can see, es5-ext/string/#/contians is the full path of import instead of hash tag...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels