Buble can't transpile preact-router
In a project, I use preact with preact-router and my pipeline runs on rollup. Now I have the problem that rollup fails when I include preact-router. This is the message:
Error transforming /…/node_modules/preact-router/src/index.js with 'buble' plugin: Cannot read property 'line' of undefined
TypeError: Error transforming /…/node_modules/preact-router/src/index.js with 'buble' plugin: Cannot read property 'line' of undefined
at getSnippet (/…/node_modules/buble/src/utils/getSnippet.js:13:29)
at Object.transform (/…/node_modules/buble/src/index.js:61:17)
at Object.transform (/…/node_modules/rollup-plugin-buble/dist/rollup-plugin-buble.cjs.js:18:17)
at /…/node_modules/rollup/src/utils/transform.js:19:35
I tried to use my fresh global buble installation to transpile the preact-router/src/index.js
with a similar error:
09:34 $ buble /…/node_modules/preact-router/src/index.js
Cannot read property 'line' of undefined
TypeError: Cannot read property 'line' of undefined
at getSnippet (/…/npm/lib/node_modules/buble/dist/buble.deps.js:5435:27)
at Object.transform (/…/npm/lib/node_modules/buble/dist/buble.deps.js:11851:17)
at compileFile (/…/npm/lib/node_modules/buble/bin/runBuble.js:42:21)
at compile (/…/npm/lib/node_modules/buble/bin/runBuble.js:13:4)
at module.exports (/…/npm/lib/node_modules/buble/bin/runBuble.js:118:3)
at Object.<anonymous> (/…/npm/lib/node_modules/buble/bin/buble:27:25)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
Type buble --help for help, or visit https://buble.surge.sh/guide/
What's the issue here?