Closed mackenza closed 8 years ago
const fs = node.require('fs');
should do the trick
nope. I tried it above and inside the define() and I get a bunch of errors that it can't load menus and other Brackets modules.
node looks to be a global. I get hints on it when I go to type it.
maybe because I am in an extension?
I will play with it some more I guess.
ok it was something else. There were 147 errors and I was missing a file that caused the rest of the extension not to load.
I spoke too soon. The extension loads now but it doesn't actually work and I get 142 errors now.
If you link the extension repo here, I can look at it later (when more important stuff is resolved). Unless you want to put up a PR with fix :-)
@mackenza where is your repo?
https://github.com/mackenza/behw I recreated it and can't test just now, but last time I tried this, it gave me all kinds of errors about loading modules.
@mackenza see https://github.com/mackenza/behw/pull/1/files
So that totally fails.
So where should I be loading my NodeJS modules? Won't the NodeJS
require
conflict with the RequireJSrequire
.Am I missing something obvious?