Browse Source

Merge pull request #835 from Permutatrix/plain-entry-path

Leave it up to resolveId to normalize the entry path
semi-dynamic-namespace-imports
Bogdan Chadkin 9 years ago
committed by GitHub
parent
commit
9500fd6601
  1. 2
      src/Bundle.js
  2. 24
      test/function/does-not-mangle-entry-point/_config.js

2
src/Bundle.js

@ -34,7 +34,7 @@ export default class Bundle {
}
});
this.entry = normalize( options.entry );
this.entry = options.entry;
this.entryId = null;
this.entryModule = null;

24
test/function/does-not-mangle-entry-point/_config.js

@ -0,0 +1,24 @@
var assert = require( 'assert' );
var modules = {
'x\\y': 'export default 42;',
'x/y': 'export default 24;'
};
module.exports = {
description: 'does not mangle entry point',
options: {
entry: 'x\\y',
plugins: [{
resolveId: function ( importee ) {
return importee;
},
load: function ( moduleId ) {
return modules[ moduleId ];
}
}]
},
exports: function ( exports ) {
assert.equal( exports, 42 );
}
};
Loading…
Cancel
Save