@open-pioneer/vite-plugin-pioneer 6.0.3 → 7.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog @open-pioneer/vite-plugin-pioneer
2
2
 
3
+ ## 7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 8e38b33: Switch this package from legacy `main` / `types` fields to the modern `exports` field in `package.json`
8
+
9
+ ### Patch Changes
10
+
11
+ - 8e38b33: Change build setup: now uses tsdown instead of esbuild.
12
+ - Updated dependencies [8e38b33]
13
+ - Updated dependencies [8e38b33]
14
+ - Updated dependencies [8e38b33]
15
+ - @open-pioneer/build-common@5.0.0
16
+
3
17
  ## 6.0.3
4
18
 
5
19
  ### Patch Changes
@@ -0,0 +1,69 @@
1
+ import { Plugin } from "vite";
2
+ //#region src/types.d.ts
3
+ interface PioneerPluginOptions {
4
+ /**
5
+ * Whether to include the root `index.html` site (by default at `src/index.html`) in the build.
6
+ *
7
+ * The file is always available when using the development server, but may be excluded when
8
+ * when deploying the project as it often contains content for testing.
9
+ *
10
+ * @default false
11
+ */
12
+ rootSite?: boolean;
13
+ /**
14
+ * List of sites to include in the build.
15
+ *
16
+ * Sites are located at `src/<SITE>/index.html` by default.
17
+ * Note that `<SITE>` may contain nested directory paths.
18
+ *
19
+ * @default []
20
+ */
21
+ sites?: string[] | undefined | false;
22
+ /**
23
+ * List of apps to include in the build.
24
+ * Apps typically register a custom web component.
25
+ *
26
+ * Apps are located at `src/apps/<APP_NAME>/app.<EXT>` by default.
27
+ * When an app is included in the build, the `dist` directory will
28
+ * contain an `<APP_NAME>.js` that can be directly imported from the browser.
29
+ *
30
+ * You can also use custom app locations instead of placing your apps in the `apps` directory,
31
+ * see examples below.
32
+ *
33
+ * Multiple extensions are supported for the app's main entry point: .ts, .tsx, .js and .jsx.
34
+ *
35
+ * @example
36
+ * Distribute the app at `src/apps/my-app/app.ts` as `my-app.js`:
37
+ *
38
+ * ```js
39
+ * {
40
+ * apps: ["my-app"]
41
+ * }
42
+ * ```
43
+ *
44
+ * Distribute the app at `src/custom/location/app.js` as `output-app.js`:
45
+ *
46
+ * ```js
47
+ * {
48
+ * apps: {
49
+ * "output-app": "custom/location/app.js"
50
+ * }
51
+ * }
52
+ * ```
53
+ *
54
+ * @default []
55
+ */
56
+ apps?: string[] | AdvancedAppOptions | undefined | false;
57
+ }
58
+ interface AdvancedAppOptions {
59
+ /**
60
+ * Associates an app name (the name of the .js file in the output directory)
61
+ * with the location of the app source code (a file name relative to the source directory).
62
+ */
63
+ [appName: string]: string;
64
+ }
65
+ //#endregion
66
+ //#region src/index.d.ts
67
+ declare function pioneer(options?: PioneerPluginOptions): Plugin[];
68
+ //#endregion
69
+ export { type AdvancedAppOptions, type PioneerPluginOptions, pioneer };