Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

rollup-plugin-vue breaks abstract base class rollup-plugin-typescript2 #311

Open
johannes-z opened this issue Nov 21, 2019 · 2 comments
Open

Comments

@johannes-z
Copy link

johannes-z commented Nov 21, 2019

Version

5.1.1

Reproduction link

https://github.com/johannes-z/alias-typescript2-vue

Steps to reproduce

yarn or npm install
yarn build or npm run build

What is expected?

Successfully emitting `./dist/index.js

What is actually happening?

Error: .../Desktop/alias-typescript2/src/util/ChildClass.vue?rollup-plugin-vue=script.ts(12,22): semantic error TS2339: Property 'getName' does not exist on type 'ChildClass'.        
    at error (...\node_modules\rollup\dist\rollup.js:5351:30)
    at throwPluginError (...\node_modules\rollup\dist\rollup.js:11916:12)
    at Object.error (...\node_modules\rollup\dist\rollup.js:11971:24)
    at Object.error (...\node_modules\rollup\dist\rollup.js:12363:38)
    at RollupContext.error ...\Desktop\alias-typescript2\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:17194:30)
    at lodash_3 ...\Desktop\alias-typescript2\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24958:23)
    at arrayEach ...\Desktop\alias-typescript2\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:534:11)
    at forEach ...\Desktop\alias-typescript2\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:9360:14)
    at printDiagnostics ...\Desktop\alias-typescript2\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:24931:5)
    at Object.transform ...\Desktop\alias-typescript2\node_modules\rollup-plugin-typescript2\dist\rollup-plugin-typescript2.cjs.js:27373:17)
    at Promise.resolve.then (...\node_modules\rollup\dist\rollup.js:12083:25)

As you can see src/typescript/ChildClass.ts is exactly the same like the .vue component and builds perfectly fine. The .vue component breaks the build process however. To me it looks like code passed from rollup-plugin-vue to rollup-plugin-typescript2 is errorneous.

EDIT: As soon as the ChildClass extends something different than Vue, the build breaks.

@J-Rojas
Copy link

J-Rojas commented Aug 24, 2021

I've experienced this bug as well after attempting to use rollup instead of Webpack. The code builds correctly in Webpack.

EDIT: Since this is a showstopper bug for me, I went back to using Webpack.

@CdTgr
Copy link

CdTgr commented Sep 1, 2021

Did anyone get a resolution for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants