Skip to content

Commit 423b834

Browse files
kbtzrhaoqunjiang
kbtzr
authored andcommitted
types: add loader options declarations (#1542)
1 parent bcee5b9 commit 423b834

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

Diff for: lib/index.d.ts

+17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
import { Plugin } from 'webpack'
2+
import { VueTemplateCompiler } from '@vue/component-compiler-utils/lib/types'
3+
import { CompilerOptions } from 'vue-template-compiler'
24

35
declare namespace VueLoader {
46
class VueLoaderPlugin extends Plugin {}
7+
8+
interface VueLoaderOptions {
9+
transformAssetUrls?: { [tag: string]: string | Array<string> }
10+
compiler?: VueTemplateCompiler
11+
compilerOptions?: CompilerOptions
12+
transpileOptions?: Object
13+
optimizeSSR?: boolean
14+
hotReload?: boolean
15+
productionMode?: boolean
16+
shadowMode?: boolean
17+
cacheDirectory?: string
18+
cacheIdentifier?: string
19+
prettify?: boolean
20+
exposeFilename?: boolean
21+
}
522
}
623

724
export = VueLoader

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"vue-style-loader": "^4.1.0"
4545
},
4646
"devDependencies": {
47+
"@types/webpack": "^4.4.27",
4748
"babel-core": "^6.26.0",
4849
"babel-loader": "^7.1.4",
4950
"babel-preset-env": "^1.6.1",

Diff for: yarn.lock

+33
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,11 @@
777777
"@shellscape/koa-send" "^4.1.0"
778778
debug "^2.6.8"
779779

780+
"@types/anymatch@*":
781+
version "1.3.1"
782+
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
783+
integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==
784+
780785
"@types/babel-types@*", "@types/babel-types@^7.0.0":
781786
version "7.0.4"
782787
resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.4.tgz#bfd5b0d0d1ba13e351dff65b6e52783b816826c8"
@@ -789,6 +794,34 @@
789794
dependencies:
790795
"@types/babel-types" "*"
791796

797+
"@types/node@*":
798+
version "11.13.7"
799+
resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.7.tgz#85dbb71c510442d00c0631f99dae957ce44fd104"
800+
integrity sha512-suFHr6hcA9mp8vFrZTgrmqW2ZU3mbWsryQtQlY/QvwTISCw7nw/j+bCQPPohqmskhmqa5wLNuMHTTsc+xf1MQg==
801+
802+
"@types/tapable@*":
803+
version "1.0.4"
804+
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
805+
integrity sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==
806+
807+
"@types/uglify-js@*":
808+
version "3.0.4"
809+
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
810+
integrity sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==
811+
dependencies:
812+
source-map "^0.6.1"
813+
814+
"@types/webpack@^4.4.27":
815+
version "4.4.27"
816+
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.27.tgz#8bb9429185977a6b3b9e6e6132f561066aa7e7c2"
817+
integrity sha512-xSll/4UXnLQ0xjdAoTRIFxA6NPC2abJ8nHxRH6SqTymHrfGCc8er7qH0npwCP8q3VFoJh2Hjz1wH8oTjwx9/jQ==
818+
dependencies:
819+
"@types/anymatch" "*"
820+
"@types/node" "*"
821+
"@types/tapable" "*"
822+
"@types/uglify-js" "*"
823+
source-map "^0.6.0"
824+
792825
793826
version "3.0.0-beta.11"
794827
resolved "https://registry.yarnpkg.com/@vue/babel-preset-app/-/babel-preset-app-3.0.0-beta.11.tgz#c8b889aa73464050f9cd3f9dc621951d85c24508"

0 commit comments

Comments
 (0)