actually, we don't want to escape @ or # in sharedPath at all

pull/750/head
Conduitry 7 years ago
parent 6ef59234a3
commit db4f148025

@ -301,13 +301,13 @@ export default function dom(
});
result =
`import { ${names.join(', ')} } from ${stringify(sharedPath, { onlyEscapeAtSymbol: true })};\n\n` +
`import { ${names.join(', ')} } from ${JSON.stringify(sharedPath)};\n\n` +
result;
}
else if (format === 'cjs') {
const SHARED = '__shared';
let requires = `var ${SHARED} = require( ${stringify(sharedPath, { onlyEscapeAtSymbol: true })} );`;
let requires = `var ${SHARED} = require( ${JSON.stringify(sharedPath)} );`;
used.forEach(name => {
const alias = generator.alias(name);
requires += `\nvar ${alias} = ${SHARED}.${name};`;

Loading…
Cancel
Save