Skip to content

refactor!: replace module.exports with ES module export #1674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: make VueLoaderPlugin type constructable
  • Loading branch information
haoqunjiang committed May 10, 2020
commit e247c97c00cdb43d7f7a387ece26615db9ff4d79
7 changes: 5 additions & 2 deletions src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as webpack from 'webpack'
type VueLoaderPlugin = webpack.Plugin & { NS: string }
declare class VueLoaderPlugin implements webpack.Plugin {
static NS: string
apply(compiler: webpack.Compiler): void
}

let Plugin: VueLoaderPlugin
let Plugin: typeof VueLoaderPlugin

if (webpack.version && webpack.version[0] > '4') {
// webpack5 and upper
Expand Down