From db4f148025ee2a1f388a00466b95472d307f852b Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sat, 5 Aug 2017 06:38:00 -0400 Subject: [PATCH] actually, we don't want to escape @ or # in sharedPath at all --- src/generators/dom/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts index fc9a2457e4..6fa230d1eb 100644 --- a/src/generators/dom/index.ts +++ b/src/generators/dom/index.ts @@ -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};`;