When using <script context="module"> in a Svelte application there is an error:
[!] (svelte plugin) SyntaxError: Unexpected token (4:1)
src/App.svelte (4:1)
SyntaxError: Unexpected token (4:1)
at Object.raise (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:6344:17)
at Object.unexpected (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:7659:16)
at Object.jsxParseIdentifier (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3377:12)
at Object.jsxParseNamespacedName (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3387:23)
at Object.jsxParseElementName (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3398:21)
at Object.jsxParseOpeningElementAt (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3480:22)
at Object.jsxParseElementAt (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3513:33)
at Object.jsxParseElement (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3587:17)
at Object.parseExprAtom (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:3594:19)
at Object.parseExprSubscripts (/home/sokil/Desktop/Lab/reshadow/packages/svelte/node_modules/.registry.npmjs.org/@babel/parser/7.4.5/node_modules/@babel/parser/lib/index.js:8413:23)
1
When using
<script context="module">
in a Svelte application there is an error: