Closed
Description
Version
16.0.0-alpha.3
Reproduction link
File of interest:
https://github.com/davelsan/vue-next-starter/blob/master/webpack.config.ts
Full repo:
https://github.com/davelsan/vue-next-starter
Steps to reproduce
Simple version:
- Create a
webpack.config.ts
file - Try to
import { VueLoaderPlugin } from 'vue-loader'
Using the provided repro
- Comment
lines [13-15]
inwebpack.config.ts
What is expected?
There should be a named export or a type definition for the default export that allows creating a new VueLoaderPlugin()
object.
What is actually happening?
webpack.config.ts:8:10 - error TS2305: Module '"./node_modules/vue-loader/dist"' has no exported member 'VueLoaderPlugin'.
Additional Comments
The repro repository is a working Vue application built without the CLI toolchain. To work around the errors listed above, I augmented the 'vue-loader' plugin as described in the TypeScript documentation:
declare module 'vue-loader' {
export class VueLoaderPlugin extends Plugin { }
}
This is only an issue when using a webpack.config.ts
, the js version works fine.