Browse Source

Added a test for not mangling the entry point

semi-dynamic-namespace-imports
Permutator 9 years ago
parent
commit
94d5877822
  1. 26
      test/function/does-not-mangle-entry-point/_config.js

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

@ -0,0 +1,26 @@
var path = require( 'path' );
var fs = require( 'fs' );
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