@pedrolamas/plugin-vue2 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/dist/index.cjs +1260 -0
- package/dist/index.d.cts +41 -0
- package/dist/index.d.mts +39 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.mjs +1248 -0
- package/package.json +65 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ViteDevServer, Plugin } from 'vite';
|
|
2
|
+
import * as _compiler from 'vue/compiler-sfc';
|
|
3
|
+
import { SFCScriptCompileOptions, SFCTemplateCompileOptions, SFCStyleCompileOptions } from 'vue/compiler-sfc';
|
|
4
|
+
|
|
5
|
+
interface VueQuery {
|
|
6
|
+
vue?: boolean;
|
|
7
|
+
src?: string;
|
|
8
|
+
type?: 'script' | 'template' | 'style' | 'custom';
|
|
9
|
+
index?: number;
|
|
10
|
+
lang?: string;
|
|
11
|
+
raw?: boolean;
|
|
12
|
+
scoped?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function parseVueRequest(id: string): {
|
|
15
|
+
filename: string;
|
|
16
|
+
query: VueQuery;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
interface Options {
|
|
20
|
+
include?: string | RegExp | (string | RegExp)[];
|
|
21
|
+
exclude?: string | RegExp | (string | RegExp)[];
|
|
22
|
+
isProduction?: boolean;
|
|
23
|
+
script?: Partial<Pick<SFCScriptCompileOptions, 'babelParserPlugins'>>;
|
|
24
|
+
template?: Partial<Pick<SFCTemplateCompileOptions, 'compiler' | 'compilerOptions' | 'preprocessOptions' | 'transpileOptions' | 'transformAssetUrls' | 'transformAssetUrlsOptions'>>;
|
|
25
|
+
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>;
|
|
26
|
+
compiler?: typeof _compiler;
|
|
27
|
+
}
|
|
28
|
+
interface ResolvedOptions extends Options {
|
|
29
|
+
compiler: typeof _compiler;
|
|
30
|
+
root: string;
|
|
31
|
+
sourceMap: boolean;
|
|
32
|
+
cssDevSourcemap: boolean;
|
|
33
|
+
devServer?: ViteDevServer;
|
|
34
|
+
devToolsEnabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare function vuePlugin(rawOptions?: Options): Plugin;
|
|
37
|
+
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
export = vuePlugin;
|
|
40
|
+
export { parseVueRequest };
|
|
41
|
+
export type { Options, ResolvedOptions, VueQuery };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ViteDevServer, Plugin } from 'vite';
|
|
2
|
+
import * as _compiler from 'vue/compiler-sfc';
|
|
3
|
+
import { SFCScriptCompileOptions, SFCTemplateCompileOptions, SFCStyleCompileOptions } from 'vue/compiler-sfc';
|
|
4
|
+
|
|
5
|
+
interface VueQuery {
|
|
6
|
+
vue?: boolean;
|
|
7
|
+
src?: string;
|
|
8
|
+
type?: 'script' | 'template' | 'style' | 'custom';
|
|
9
|
+
index?: number;
|
|
10
|
+
lang?: string;
|
|
11
|
+
raw?: boolean;
|
|
12
|
+
scoped?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function parseVueRequest(id: string): {
|
|
15
|
+
filename: string;
|
|
16
|
+
query: VueQuery;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
interface Options {
|
|
20
|
+
include?: string | RegExp | (string | RegExp)[];
|
|
21
|
+
exclude?: string | RegExp | (string | RegExp)[];
|
|
22
|
+
isProduction?: boolean;
|
|
23
|
+
script?: Partial<Pick<SFCScriptCompileOptions, 'babelParserPlugins'>>;
|
|
24
|
+
template?: Partial<Pick<SFCTemplateCompileOptions, 'compiler' | 'compilerOptions' | 'preprocessOptions' | 'transpileOptions' | 'transformAssetUrls' | 'transformAssetUrlsOptions'>>;
|
|
25
|
+
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>;
|
|
26
|
+
compiler?: typeof _compiler;
|
|
27
|
+
}
|
|
28
|
+
interface ResolvedOptions extends Options {
|
|
29
|
+
compiler: typeof _compiler;
|
|
30
|
+
root: string;
|
|
31
|
+
sourceMap: boolean;
|
|
32
|
+
cssDevSourcemap: boolean;
|
|
33
|
+
devServer?: ViteDevServer;
|
|
34
|
+
devToolsEnabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare function vuePlugin(rawOptions?: Options): Plugin;
|
|
37
|
+
|
|
38
|
+
export { vuePlugin as default, parseVueRequest };
|
|
39
|
+
export type { Options, ResolvedOptions, VueQuery };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ViteDevServer, Plugin } from 'vite';
|
|
2
|
+
import * as _compiler from 'vue/compiler-sfc';
|
|
3
|
+
import { SFCScriptCompileOptions, SFCTemplateCompileOptions, SFCStyleCompileOptions } from 'vue/compiler-sfc';
|
|
4
|
+
|
|
5
|
+
interface VueQuery {
|
|
6
|
+
vue?: boolean;
|
|
7
|
+
src?: string;
|
|
8
|
+
type?: 'script' | 'template' | 'style' | 'custom';
|
|
9
|
+
index?: number;
|
|
10
|
+
lang?: string;
|
|
11
|
+
raw?: boolean;
|
|
12
|
+
scoped?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function parseVueRequest(id: string): {
|
|
15
|
+
filename: string;
|
|
16
|
+
query: VueQuery;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
interface Options {
|
|
20
|
+
include?: string | RegExp | (string | RegExp)[];
|
|
21
|
+
exclude?: string | RegExp | (string | RegExp)[];
|
|
22
|
+
isProduction?: boolean;
|
|
23
|
+
script?: Partial<Pick<SFCScriptCompileOptions, 'babelParserPlugins'>>;
|
|
24
|
+
template?: Partial<Pick<SFCTemplateCompileOptions, 'compiler' | 'compilerOptions' | 'preprocessOptions' | 'transpileOptions' | 'transformAssetUrls' | 'transformAssetUrlsOptions'>>;
|
|
25
|
+
style?: Partial<Pick<SFCStyleCompileOptions, 'trim'>>;
|
|
26
|
+
compiler?: typeof _compiler;
|
|
27
|
+
}
|
|
28
|
+
interface ResolvedOptions extends Options {
|
|
29
|
+
compiler: typeof _compiler;
|
|
30
|
+
root: string;
|
|
31
|
+
sourceMap: boolean;
|
|
32
|
+
cssDevSourcemap: boolean;
|
|
33
|
+
devServer?: ViteDevServer;
|
|
34
|
+
devToolsEnabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare function vuePlugin(rawOptions?: Options): Plugin;
|
|
37
|
+
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
export = vuePlugin;
|
|
40
|
+
export { parseVueRequest };
|
|
41
|
+
export type { Options, ResolvedOptions, VueQuery };
|