@sveltejs/vite-plugin-svelte 1.4.0 → 2.0.0-beta.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/dist/index.d.ts +7 -2
- package/package.json +7 -10
- package/dist/index.cjs +0 -2336
- package/dist/index.cjs.map +0 -1
- package/dist/preprocess.cjs +0 -127
- package/dist/preprocess.cjs.map +0 -1
- package/dist/preprocess.d.ts +0 -9
- package/dist/preprocess.js +0 -96
- package/dist/preprocess.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import * as vite from 'vite';
|
|
1
2
|
import { UserConfig, Plugin } from 'vite';
|
|
2
3
|
import { CompileOptions, Warning } from 'svelte/types/compiler/interfaces';
|
|
3
4
|
export { CompileOptions, Warning } from 'svelte/types/compiler/interfaces';
|
|
4
5
|
import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';
|
|
5
6
|
export { MarkupPreprocessor, Preprocessor, PreprocessorGroup, Processed } from 'svelte/types/compiler/preprocess';
|
|
6
|
-
export { vitePreprocess } from './preprocess.js';
|
|
7
7
|
|
|
8
8
|
type Options = Omit<SvelteOptions, 'vitePlugin'> & PluginOptionsInline;
|
|
9
9
|
interface PluginOptionsInline extends PluginOptions {
|
|
@@ -245,6 +245,11 @@ type ModuleFormat = NonNullable<CompileOptions['format']>;
|
|
|
245
245
|
type CssHashGetter = NonNullable<CompileOptions['cssHash']>;
|
|
246
246
|
type Arrayable<T> = T | T[];
|
|
247
247
|
|
|
248
|
+
declare function vitePreprocess(opts?: {
|
|
249
|
+
script?: boolean;
|
|
250
|
+
style?: boolean | vite.InlineConfig | vite.ResolvedConfig;
|
|
251
|
+
}): PreprocessorGroup;
|
|
252
|
+
|
|
248
253
|
declare function loadSvelteConfig(viteConfig?: UserConfig, inlineOptions?: Partial<Options>): Promise<Partial<SvelteOptions> | undefined>;
|
|
249
254
|
|
|
250
255
|
type SvelteWarningsMessage = {
|
|
@@ -259,4 +264,4 @@ type SvelteWarningsMessage = {
|
|
|
259
264
|
|
|
260
265
|
declare function svelte(inlineOptions?: Partial<Options>): Plugin[];
|
|
261
266
|
|
|
262
|
-
export { Arrayable, CssHashGetter, ModuleFormat, Options, PluginOptions, SvelteOptions, SvelteWarningsMessage, loadSvelteConfig, svelte };
|
|
267
|
+
export { Arrayable, CssHashGetter, ModuleFormat, Options, PluginOptions, SvelteOptions, SvelteWarningsMessage, loadSvelteConfig, svelte, vitePreprocess };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltejs/vite-plugin-svelte",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "dominikg",
|
|
6
6
|
"files": [
|
|
@@ -9,14 +9,11 @@
|
|
|
9
9
|
"*.d.ts"
|
|
10
10
|
],
|
|
11
11
|
"type": "module",
|
|
12
|
-
"main": "dist/index.cjs",
|
|
13
|
-
"module": "dist/index.js",
|
|
14
12
|
"types": "dist/index.d.ts",
|
|
15
13
|
"exports": {
|
|
16
14
|
".": {
|
|
17
15
|
"types": "./dist/index.d.ts",
|
|
18
|
-
"import": "./dist/index.js"
|
|
19
|
-
"require": "./dist/index.cjs"
|
|
16
|
+
"import": "./dist/index.js"
|
|
20
17
|
},
|
|
21
18
|
"./package.json": "./package.json",
|
|
22
19
|
"./src/ui/*": "./src/ui/*"
|
|
@@ -43,25 +40,25 @@
|
|
|
43
40
|
"debug": "^4.3.4",
|
|
44
41
|
"deepmerge": "^4.2.2",
|
|
45
42
|
"kleur": "^4.1.5",
|
|
46
|
-
"magic-string": "^0.
|
|
43
|
+
"magic-string": "^0.27.0",
|
|
47
44
|
"svelte-hmr": "^0.15.1",
|
|
48
45
|
"vitefu": "^0.2.2"
|
|
49
46
|
},
|
|
50
47
|
"peerDependencies": {
|
|
51
48
|
"svelte": "^3.44.0",
|
|
52
|
-
"vite": "^
|
|
49
|
+
"vite": "^4.0.0-beta.1"
|
|
53
50
|
},
|
|
54
51
|
"devDependencies": {
|
|
55
52
|
"@types/debug": "^4.1.7",
|
|
56
|
-
"esbuild": "^0.15.
|
|
53
|
+
"esbuild": "^0.15.18",
|
|
57
54
|
"rollup": "^2.79.1",
|
|
58
55
|
"svelte": "^3.53.1",
|
|
59
56
|
"tsup": "^6.5.0",
|
|
60
|
-
"vite": "^
|
|
57
|
+
"vite": "^4.0.0-beta.1"
|
|
61
58
|
},
|
|
62
59
|
"scripts": {
|
|
63
60
|
"dev": "pnpm build:ci --sourcemap --watch src",
|
|
64
|
-
"build:ci": "rimraf dist && tsup-node src/index.ts
|
|
61
|
+
"build:ci": "rimraf dist && tsup-node src/index.ts --format esm",
|
|
65
62
|
"build": "pnpm build:ci --dts --sourcemap"
|
|
66
63
|
}
|
|
67
64
|
}
|