We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See https://repl.it/repls/RobustConcreteHypertalk for a complete example.
Module:
module.exports.getLocation = function() { return require.resolve("./rollup.config.json"); }
Input:
import { getLocation } from "locator"; console.log("Location of config is " + getLocation());
Rollup leaves require.resolve as-is, because no actual requiring is performed.
require.resolve
Rollup replaces require with commonjsRequire, causing the error commonjsRequire.resolve is not a function.
require
commonjsRequire
commonjsRequire.resolve is not a function
The text was updated successfully, but these errors were encountered:
update workaround for require.resolve rollup/plugins#406
507bc4f
as a workaround you can replace commonjsRequire.resolve with require.resolve from output plugins
commonjsRequire.resolve
export default { // ... output: { // ... plugins: [ replace({ 'commonjsRequire.resolve': 'require.resolve' }) ] } }
Sorry, something went wrong.
d8ebceb
This was fixed by #446
No branches or pull requests
How Do We Reproduce?
See https://repl.it/repls/RobustConcreteHypertalk for a complete example.
Module:
Input:
Expected Behavior
Rollup leaves
require.resolve
as-is, because no actual requiring is performed.Actual Behavior
Rollup replaces
require
withcommonjsRequire
, causing the errorcommonjsRequire.resolve is not a function
.The text was updated successfully, but these errors were encountered: