@storybook/builder-vite 7.0.19 → 7.0.20
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.js +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
window.__STORYBOOK_PREVIEW__.onGetProjectAnnotationsChanged({ getProjectAnnotations });
|
|
118
118
|
});
|
|
119
119
|
}`.trim())(frameworkName)};
|
|
120
|
-
`.trim()}var path2=__toESM(require("path")),import_vite4=require("vite"),import_node_logger=require("@storybook/node-logger");var path=__toESM(require("path"));var import_glob_promise=require("glob-promise"),import_core_common5=require("@storybook/core-common");async function listStories(options){return(await Promise.all((0,import_core_common5.normalizeStories)(await options.presets.apply("stories",[],options),{configDir:options.configDir,workingDir:options.configDir}).map(({directory,files})=>{let pattern=path.join(directory,files),absolutePattern=path.isAbsolute(pattern)?pattern:path.join(options.configDir,pattern);return(0,import_glob_promise.promise)(slash(absolutePattern),{follow:!0})}))).reduce((carry,stories)=>carry.concat(stories),[])}function toImportPath(relativePath){return relativePath.startsWith("../")?relativePath:`./${relativePath}`}async function toImportFn(stories){return`
|
|
120
|
+
`.trim()}var path2=__toESM(require("path")),import_vite4=require("vite"),import_node_logger=require("@storybook/node-logger");var path=__toESM(require("path"));var import_glob_promise=require("glob-promise"),import_core_common5=require("@storybook/core-common");async function listStories(options){return(await Promise.all((0,import_core_common5.normalizeStories)(await options.presets.apply("stories",[],options),{configDir:options.configDir,workingDir:options.configDir}).map(({directory,files})=>{let pattern=path.join(directory,files),absolutePattern=path.isAbsolute(pattern)?pattern:path.join(options.configDir,pattern);return(0,import_glob_promise.promise)(slash(absolutePattern),{...(0,import_core_common5.commonGlobOptions)(absolutePattern),follow:!0})}))).reduce((carry,stories)=>carry.concat(stories),[])}function toImportPath(relativePath){return relativePath.startsWith("../")?relativePath:`./${relativePath}`}async function toImportFn(stories){return`
|
|
121
121
|
const importers = {
|
|
122
122
|
${stories.map(file=>{let ext=path2.extname(file),relativePath=(0,import_vite4.normalizePath)(path2.relative(process.cwd(),file));return[".js",".jsx",".ts",".tsx",".mdx",".svelte",".vue"].includes(ext)||import_node_logger.logger.warn(`Cannot process ${ext} file with storyStoreV7: ${relativePath}`),` '${toImportPath(relativePath)}': async () => import('/@fs/${file}')`}).join(`,
|
|
123
123
|
`)}
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { ensureDir, emptyDir, ensureFile, writeFile } from 'fs-extra';
|
|
|
3
3
|
import express from 'express';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import { join, parse, dirname, isAbsolute, relative, resolve } from 'path';
|
|
6
|
-
import { normalizeStories, getBuilderOptions, isPreservingSymlinks, getFrameworkName, stringifyEnvs, getRendererName, loadPreviewOrConfigFile, stripAbsNodeModulesPath } from '@storybook/core-common';
|
|
6
|
+
import { normalizeStories, getBuilderOptions, isPreservingSymlinks, getFrameworkName, commonGlobOptions, stringifyEnvs, getRendererName, loadPreviewOrConfigFile, stripAbsNodeModulesPath } from '@storybook/core-common';
|
|
7
7
|
import { createFilter, createServer, mergeConfig, build as build$1, loadConfigFromFile, normalizePath, resolveConfig, mergeAlias } from 'vite';
|
|
8
8
|
import { globals } from '@storybook/preview/globals';
|
|
9
9
|
import { parse as parse$1, init } from 'es-module-lexer';
|
|
@@ -134,7 +134,7 @@ var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(
|
|
|
134
134
|
window.__STORYBOOK_PREVIEW__.onGetProjectAnnotationsChanged({ getProjectAnnotations });
|
|
135
135
|
});
|
|
136
136
|
}`.trim())(frameworkName)};
|
|
137
|
-
`.trim()}async function listStories(options){return (await Promise.all(normalizeStories(await options.presets.apply("stories",[],options),{configDir:options.configDir,workingDir:options.configDir}).map(({directory,files})=>{let pattern=path.join(directory,files),absolutePattern=path.isAbsolute(pattern)?pattern:path.join(options.configDir,pattern);return promise(slash(absolutePattern),{follow:!0})}))).reduce((carry,stories)=>carry.concat(stories),[])}function toImportPath(relativePath){return relativePath.startsWith("../")?relativePath:`./${relativePath}`}async function toImportFn(stories){return `
|
|
137
|
+
`.trim()}async function listStories(options){return (await Promise.all(normalizeStories(await options.presets.apply("stories",[],options),{configDir:options.configDir,workingDir:options.configDir}).map(({directory,files})=>{let pattern=path.join(directory,files),absolutePattern=path.isAbsolute(pattern)?pattern:path.join(options.configDir,pattern);return promise(slash(absolutePattern),{...commonGlobOptions(absolutePattern),follow:!0})}))).reduce((carry,stories)=>carry.concat(stories),[])}function toImportPath(relativePath){return relativePath.startsWith("../")?relativePath:`./${relativePath}`}async function toImportFn(stories){return `
|
|
138
138
|
const importers = {
|
|
139
139
|
${stories.map(file=>{let ext=path.extname(file),relativePath=normalizePath(path.relative(process.cwd(),file));return [".js",".jsx",".ts",".tsx",".mdx",".svelte",".vue"].includes(ext)||logger.warn(`Cannot process ${ext} file with storyStoreV7: ${relativePath}`),` '${toImportPath(relativePath)}': async () => import('/@fs/${file}')`}).join(`,
|
|
140
140
|
`)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/builder-vite",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.20",
|
|
4
4
|
"description": "A plugin to run and build Storybooks with Vite",
|
|
5
5
|
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/lib/builder-vite/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@storybook/channel-postmessage": "7.0.
|
|
46
|
-
"@storybook/channel-websocket": "7.0.
|
|
47
|
-
"@storybook/client-logger": "7.0.
|
|
48
|
-
"@storybook/core-common": "7.0.
|
|
49
|
-
"@storybook/csf-plugin": "7.0.
|
|
45
|
+
"@storybook/channel-postmessage": "7.0.20",
|
|
46
|
+
"@storybook/channel-websocket": "7.0.20",
|
|
47
|
+
"@storybook/client-logger": "7.0.20",
|
|
48
|
+
"@storybook/core-common": "7.0.20",
|
|
49
|
+
"@storybook/csf-plugin": "7.0.20",
|
|
50
50
|
"@storybook/mdx2-csf": "^1.0.0",
|
|
51
|
-
"@storybook/node-logger": "7.0.
|
|
52
|
-
"@storybook/preview": "7.0.
|
|
53
|
-
"@storybook/preview-api": "7.0.
|
|
54
|
-
"@storybook/types": "7.0.
|
|
51
|
+
"@storybook/node-logger": "7.0.20",
|
|
52
|
+
"@storybook/preview": "7.0.20",
|
|
53
|
+
"@storybook/preview-api": "7.0.20",
|
|
54
|
+
"@storybook/types": "7.0.20",
|
|
55
55
|
"browser-assert": "^1.2.1",
|
|
56
56
|
"es-module-lexer": "^0.9.3",
|
|
57
57
|
"express": "^4.17.3",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
],
|
|
101
101
|
"platform": "node"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "9fb2573aa274f3f69d3358050e8df9c903e8245f"
|
|
104
104
|
}
|