histoire 1.0.0-alpha.3 → 1.0.0-alpha.4

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.
@@ -21,7 +21,7 @@ export async function createServer(ctx, options = {}) {
21
21
  }
22
22
  }
23
23
  const server = await createViteServer(mergeViteConfig(viteConfig, {
24
- optimizeDeps: { include: [], noDiscovery: true },
24
+ optimizeDeps: { include: viteConfig.optimizeDeps?.include ?? [], noDiscovery: true },
25
25
  }));
26
26
  await server.pluginContainer.buildStart({});
27
27
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/node/vite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAGb,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAe3C,wBAAsB,uBAAuB,CAAC,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,yBAmCnF;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,YAAY,CAAA;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAmS9G"}
1
+ {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../../src/node/vite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAGb,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAe3C,wBAAsB,uBAAuB,CAAC,UAAU,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,yBAmCnF;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,YAAY,CAAA;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAED,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyS9G"}
package/dist/node/vite.js CHANGED
@@ -304,6 +304,11 @@ export async function getViteConfigWithPlugins(isServer, ctx) {
304
304
  },
305
305
  });
306
306
  }
307
+ for (const plugin of ctx.config.plugins) {
308
+ if (plugin.vitePlugins) {
309
+ await plugin.vitePlugins(plugins);
310
+ }
311
+ }
307
312
  const viteConfig = mergeViteConfig(inlineConfig, {
308
313
  configFile: false,
309
314
  plugins,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "histoire",
3
3
  "type": "module",
4
- "version": "1.0.0-alpha.3",
4
+ "version": "1.0.0-alpha.4",
5
5
  "description": "A fast story book powered by Vite",
6
6
  "author": {
7
7
  "name": "Guillaume Chau"
@@ -65,10 +65,10 @@
65
65
  "shiki": "^3.0.0",
66
66
  "sirv": "^3.0.0",
67
67
  "vite-node": "3.2.4",
68
- "@histoire/app": "^1.0.0-alpha.3",
69
- "@histoire/controls": "^1.0.0-alpha.3",
70
- "@histoire/vendors": "^1.0.0-alpha.3",
71
- "@histoire/shared": "^1.0.0-alpha.3"
68
+ "@histoire/app": "^1.0.0-alpha.4",
69
+ "@histoire/controls": "^1.0.0-alpha.4",
70
+ "@histoire/vendors": "^1.0.0-alpha.4",
71
+ "@histoire/shared": "^1.0.0-alpha.4"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/fs-extra": "^11.0.4",
@@ -34,7 +34,7 @@ export async function createServer(ctx: Context, options: CreateServerOptions =
34
34
 
35
35
  const server = await createViteServer(
36
36
  mergeViteConfig(viteConfig, {
37
- optimizeDeps: { include: [], noDiscovery: true },
37
+ optimizeDeps: { include: viteConfig.optimizeDeps?.include ?? [], noDiscovery: true },
38
38
  }),
39
39
  )
40
40
  await server.pluginContainer.buildStart({})
package/src/node/vite.ts CHANGED
@@ -342,6 +342,12 @@ export async function getViteConfigWithPlugins(isServer: boolean, ctx: Context):
342
342
  })
343
343
  }
344
344
 
345
+ for (const plugin of ctx.config.plugins) {
346
+ if (plugin.vitePlugins) {
347
+ await plugin.vitePlugins(plugins)
348
+ }
349
+ }
350
+
345
351
  const viteConfig = mergeViteConfig(inlineConfig, {
346
352
  configFile: false,
347
353
  plugins,