🙋 feature request
In UNIX systems, the first line of a script can be a shebang with the path to the interpreter. When the main entry file has this shebang (and optionally when target: node), this shebang line could be taken out of the bundled modules and outputted in the first line of the bundle.
🤔 Expected Behavior
hello-world.js:
#!/usr/bin/env node
console.log("Hello, world!");
$ parcel build -t node hello-world.js
dist/hello-world.js:
#!/usr/bin/env node
// parcel bundle prologue ...function(require,module,exports) {
console.log("Hello, world!");
// }... parcel bundle epilogue
😯 Current Behavior
dist/hello-world.js:
// parcel bundle prologue ...function(require,module,exports) {
#!/usr/bin/env node
console.log("Hello, world!");
// }... parcel bundle epilogue
(which is actually a SyntaxError)
🔦 Context
I run into this when trying to make executable scripts for node which have all their files already bundled.
🙋 feature request
In UNIX systems, the first line of a script can be a shebang with the path to the interpreter. When the main entry file has this shebang (and optionally when
target: node), this shebang line could be taken out of the bundled modules and outputted in the first line of the bundle.🤔 Expected Behavior
hello-world.js:dist/hello-world.js:😯 Current Behavior
dist/hello-world.js:(which is actually a
SyntaxError)🔦 Context
I run into this when trying to make executable scripts for node which have all their files already bundled.