You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been compiling successfully using this example for a couple months. However, recently I have refactored, which involved putting code in src/save/index.js:
import {parse} from '../parse/parse';
In dist/save/index.js this translates to:
var _parseParse = require('parse/parse');
which isn't correct and fails.
I notice in the Brocfile, there is
// Fix relative imports inside /index's
resolveModuleSource: function (source, filename) {
var match = filename.match(/(.+)\/index\.\S+$/i);
// is this an import inside an /index file?
if (match) {
var path = match[1];
return source
.replace(/^\.\//, path + '/')
.replace(/^\.\.\//, '');
return ns;
} else {
return source;
}
}
However, this seems not to be called -- when I put diagnostics in this function, they are never triggered. In any case, the content is mystifying: in particular
.replace(/^\.\.\//, '');
just gets rid of ".." ... certainly seems wrong to me, though I don't know what the input looks like as I couldn't get debugger to stop here or to print anything out. Is this a problem here, or perhaps with broccoli-babel-transpiler (as resolveModuleSource seems not to be called)?
UPDATE
Was using broccoli-babel-transpiler v5.4.5. When I updated to 5.5.0, I can now see my diagnostics (so resolveModuleSource is being called). The resulting "require" remains the same, though.
The text was updated successfully, but these errors were encountered:
(As you may recall, I'm using this in a node project.) #2
I guess the resolveModuleSource is there for web projects in any case. For use in node, its not needed (and breaks things, as I just learned). Getting rid of it in the Brocfile resolves this issue.
I have been compiling successfully using this example for a couple months. However, recently I have refactored, which involved putting code in
src/save/index.js
:In dist/save/index.js this translates to:
var _parseParse = require('parse/parse');
which isn't correct and fails.
I notice in the Brocfile, there is
However, this seems not to be called -- when I put diagnostics in this function, they are never triggered. In any case, the content is mystifying: in particular
just gets rid of ".." ... certainly seems wrong to me, though I don't know what the input looks like as I couldn't get debugger to stop here or to print anything out. Is this a problem here, or perhaps with
broccoli-babel-transpiler
(asresolveModuleSource
seems not to be called)?UPDATE
Was using
broccoli-babel-transpiler
v5.4.5. When I updated to 5.5.0, I can now see my diagnostics (soresolveModuleSource
is being called). The resulting "require" remains the same, though.The text was updated successfully, but these errors were encountered: