Skip to content
New issue

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

commonjs plugin errors on hashbangs #1602

Closed
privatenumber opened this issue Oct 4, 2023 · 1 comment · Fixed by #1610
Closed

commonjs plugin errors on hashbangs #1602

privatenumber opened this issue Oct 4, 2023 · 1 comment · Fixed by #1610

Comments

@privatenumber
Copy link

Expected Behavior

For it to ignore the hash bang, as Rollup does without the commonjs plugin.

Actual Behavior

Errors:

[!] (plugin commonjs--resolver) RollupError: Unexpected character '!'
src/main.js (1:0)
1: #! /usr/bin/env node
   ^
2: 
3: module.exports = 1;
    at error (/home/projects/rollup-repro-cieydd/node_modules/rollup/dist/shared/rollup.js:210:30)
    at Module.error (/home/projects/rollup-repro-cieydd/node_modules/rollup/dist/shared/rollup.js:13498:16)
    at Module.tryParse (/home/projects/rollup-repro-cieydd/node_modules/rollup/dist/shared/rollup.js:13875:25)
    at Module.setSource (/home/projects/rollup-repro-cieydd/node_modules/rollup/dist/shared/rollup.js:13784:24)
    at ModuleLoader.addModuleSource (/home/projects/rollup-repro-cieydd/node_modules/rollup/dist/shared/rollup.js:23216:20)

Additional Information

@privatenumber
Copy link
Author

Relevant issue:
rollup/rollup-plugin-commonjs#261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant