rollup-plugin-typescript2: watch mode error for non-TS files (Handlebars, Vue)
I import Handlebars template files which should be ignored by the diagnostics.
Error: Could not find file: '/Users/mohamed/project/src/Views/Shared/spaces.hbs'.
at getValidSourceFile (/Users/mohamed/project/node_modules/typescript/lib/typescript.js:91281:23)
at Object.getSyntacticDiagnostics (/Users/mohamed/project/node_modules/typescript/lib/typescript.js:91504:52)
at /Users/mohamed/project/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:629:74
at /Users/mohamed/project/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:325:80
at arrayEach (/Users/mohamed/project/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:537:11)
at Function.forEach (/Users/mohamed/project/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:9359:14)
at TsCache.walkTree (/Users/mohamed/project/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:325:9)
at Object.ongenerate (/Users/mohamed/project/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:628:17)
at bundle.plugins.forEach.plugin (/Users/mohamed/project/node_modules/rollup/dist/rollup.js:10507:16)
at Array.forEach (<anonymous>)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (9 by maintainers)
Commits related to this issue
- - fix for #32 - fix for typescript typing changes — committed to ezolenko/rollup-plugin-typescript2 by ezolenko 7 years ago
- - fix for #32 — committed to ezolenko/rollup-plugin-typescript2 by ezolenko 6 years ago
I’ve been testing the master branch for a while. So far so good. I think this is it. Thank you 😄
It’s been two days. Everything is fine. I think you can release the patch now. Thank you.
Ok, finally got around to it, @hiendv could you check if master works for you?
@ezolenko @ezolenko2 Could you look at this? Thanks. https://github.com/hiendv/rpt2-vue-issue-32
Edit 1: Add a screen cast
I’m on it but it’s kinda hard because of the random appearance of the error.
Hah, yeah it seems fine now 😄
I do import them like so:
with declaration elsewhere:
It doesn’t happen in a non-watch build.
rollup.config.js:
tsconfig.json