WIP fix(bundler): fix commonjs node id compatibility.#831
WIP fix(bundler): fix commonjs node id compatibility.#8313cp wants to merge 1 commit intoaurelia:masterfrom 3cp:fix-commonjs-node-id-compatibility
Conversation
Commonjs thinks "foo" and "foo.js" are same id, but AMD thinks they are two different ids. Passing `nodeIdCompact: true` to requirejs config to improve compatibility to whole range of commonjs packages. Ref: amodrojs/amodro-trace#7
|
This solves date-fns bundling issue. There is another issue related to date-fns. I think it is quite safe to use |
|
@huochunpeng thanks for the PR, i'll have a look about using index.js as default, I think that should be fine since it's the last one, but I would prefer if we could check to see if that file exists before trying to execute the strategy |
|
Sure, to ease my setup, I will create PR for that after this one is merged. |
|
nodeIdCompat only fixes requrejs setup, not systemjs. |
|
There is complication in test. All apps need to update aurelia-karma.js in order to run test normally. Plus this doesn't help on systemjs setup. I am working on a better solution. |
|
obsoleted by #862 |
Commonjs thinks "foo" and "foo.js" are same id, but AMD thinks they are two different ids. Passing
nodeIdCompat: trueto requirejs config to improve compatibility to whole range of commonjs packages. Ref: amodrojs/amodro-trace#7