-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.d.ts
72 lines (70 loc) · 1.73 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { Compiler } from 'webpack'
export interface BackgroundOptions {
/** Undocumented. */
noWarningDynamicEntry?: boolean
/**
* The entry point of the background scripts
* in your webpack config.
* @deprecated
* Use pageEntry and serviceWorkerEntry instead.
*/
entry?: string
/**
* Using Manifest V2 or V3.
*
* If using Manifest V3,
* the entry you provided will be packed as a Worker.
*
* @defaultValue 2
* @deprecated
*/
manifest?: 2 | 3
/**
* The entry point of the background page.
*/
pageEntry?: string
/**
* The entry point of the service worker.
*/
serviceWorkerEntry?: string
/**
* Only affects in Manifest V3.
*
* Load all chunks at the beginning
* to workaround the chrome bug
* https://bugs.chromium.org/p/chromium/issues/detail?id=1198822.
*
* @defaultValue true
*/
eagerChunkLoading?: boolean
/**
* Add the support code that use
* `chrome.scripting.executeScript` (MV3) or
* `chrome.tabs.executeScript` (MV2) when
* dynamic import does not work for chunk loading
* in the content script.
* @defaultValue true
*/
classicLoader?: boolean
}
export interface WebExtensionPluginOptions {
/** Append a thunk for Manifest V3 entry. */
background?: BackgroundOptions
/**
* Configure HMR automatically for you.
* @defaultValue true
*/
hmrConfig?: boolean
/**
* Use a weak runtime check, in case the code will be evaluated during the compile.
*
* Enable this option when you're using mini-css-extract-plugin.
* @defaultValue false
*/
weakRuntimeCheck?: boolean
}
export default class Webpack5 {
constructor(options?: WebExtensionPluginOptions)
apply(compiler: Compiler): void
}
export = Webpack5