Closed bpstrngr closed 1 year ago
probably same issue in neighboring file src/utils/options/normalizeOutputOptions.ts:
const getAddon = <T extends 'banner' | 'footer' | 'intro' | 'outro'>(
^
config: OutputOptions,
name: T
): NormalizedOutputOptions[T] => {
const configAddon = config[name];
if (typeof configAddon === 'function') {
return configAddon as NormalizedOutputOptions[T];
}
return () => configAddon || '';
};
SyntaxError: Unexpected token (283:28)
at pp.raise (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/haverbeke_2012_acorn/0/acorn/src/location.js:15:13)
at TypeScriptParser.raiseCommonCheck (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:4975:44)
at TypeScriptParser.raise (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:4981:29)
at pp.unexpected (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/haverbeke_2012_acorn/0/acorn/src/parseutil.js:111:8)
at TypeScriptParser.jsx_parseIdentifier (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:773:22)
at TypeScriptParser.jsx_parseNamespacedName (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:780:29)
at TypeScriptParser.jsx_parseAttribute (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:847:30)
at TypeScriptParser.jsx_parseOpeningElementAt (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:5017:47)
at TypeScriptParser.jsx_parseElementAt (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:878:39)
at TypeScriptParser.jsx_parseElement (file:///mnt/chromeos/GoogleDrive/MyDrive/blik/tyrealhu_2023_acorn_typescript.js:926:25) {
pos: 8472,
loc: Position { line: 283, column: 28 },
raisedAt: 8480
}
Had been fixed in version 1.4.3
Thrown in Rollup's src/utils/options/normalizeInputOptions.ts:
looks like jsx is getting involved, this might be a tough one... I was surprised actually that the acorn Parser's class name became "JSXParser" by the way after extending with this plugin, is there an option to not enable JSX parsing along with typescript?