Closed zooshme closed 9 years ago
I have no idea if this will work, but try compiling with --standalone "module.exports"
:
$ duo --standalone "module.exports" --stdout input.js > output.js
Then you might be able to require it via node:
var foo = require('./output.js');
Thank you. It works. Is there a way to require the resulted code without writing to a file?
I doubt it, I'm afraid.
Hi. Is there a way I could require a javascript module compiled by duo.js into a node application on the back end? At the moment when I require it, it is simply an empty object. I have tried installing node-amd-loader but still the same result.