cramforce/splittable

failed to load module

Closed this issue · 4 comments

Possibly expected but here's the steps to reproduce.

entry.js

var document = require('bel')
console.log('hi')
node_modules/global/document.js:3: ERROR - Failed to load module "min-document"
var minDoc = require('min-document');
             ^

1 error(s), 0 warning(s)
java.lang.RuntimeException: INTERNAL COMPILER ERROR.
Please report this problem.

Looks like there is a require('global/document') shim thing thats barfing maybe?

Quick update before I get off the shuttle:

min-document can't be found. Its package root is missing on the flags to closure compiler, so the bug is further up the food chain.

Ah, just found the problem. There appears to be a browser key in package.json that hides the modules during compilation for the web. I will need to somehow fake these modules to make closure compiler happy, because it still sees the require and fails to find the implementation.

Fixed the problem. Leaving open, because I didn't write any tests for the new functionality.

npm publish
+ splittable@3.1.0

dope thx! seems to work. still experimenting and will report back 👍