@teambit/preview 1.0.187 → 1.0.189
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_preview_preview-preview.js +1 -1
- package/artifacts/schema.json +891 -207
- package/dist/artifact-file-middleware.js.map +1 -1
- package/dist/bundler/chunks.js.map +1 -1
- package/dist/bundler/create-peer-link.spec.js.map +1 -1
- package/dist/bundler/create-peers-link.js.map +1 -1
- package/dist/bundler/html-plugin.js.map +1 -1
- package/dist/bundler/html-template.js.map +1 -1
- package/dist/bundling-strategy.js.map +1 -1
- package/dist/component-preview.js.map +1 -1
- package/dist/component-preview.route.js.map +1 -1
- package/dist/env-preview-template.task.js.map +1 -1
- package/dist/env-template.route.js.map +1 -1
- package/dist/events/click-inside-an-iframe.js.map +1 -1
- package/dist/events/index.js.map +1 -1
- package/dist/exceptions/bundling-strategy-not-found.js.map +1 -1
- package/dist/exceptions/index.js.map +1 -1
- package/dist/exceptions/preview-artifact-not-found.js.map +1 -1
- package/dist/exceptions/preview-not-found.js.map +1 -1
- package/dist/exceptions/preview-output-file-not-found.js.map +1 -1
- package/dist/execution-ref.js.map +1 -1
- package/dist/generate-link.js.map +1 -1
- package/dist/gql/fetch-component-aspects.js.map +1 -1
- package/dist/html-utils.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mk-temp-dir.js.map +1 -1
- package/dist/pre-bundle-utils.js.map +1 -1
- package/dist/pre-bundle.js.map +1 -1
- package/dist/pre-bundle.task.js.map +1 -1
- package/dist/preview-1710224484125.js +7 -0
- package/dist/preview-artifact.js.map +1 -1
- package/dist/preview-assets.route.js.map +1 -1
- package/dist/preview-context.js.map +1 -1
- package/dist/preview-definition.js.map +1 -1
- package/dist/preview-env.js.map +1 -1
- package/dist/preview-modules.js.map +1 -1
- package/dist/preview-type.js.map +1 -1
- package/dist/preview.aspect.js.map +1 -1
- package/dist/preview.composition.js.map +1 -1
- package/dist/preview.graphql.js +2 -3
- package/dist/preview.graphql.js.map +1 -1
- package/dist/preview.js.map +1 -1
- package/dist/preview.main.runtime.js.map +1 -1
- package/dist/preview.preview.runtime.js.map +1 -1
- package/dist/preview.route.js.map +1 -1
- package/dist/preview.service.js.map +1 -1
- package/dist/preview.start-plugin.js.map +1 -1
- package/dist/preview.task.js.map +1 -1
- package/dist/rendering-context.js.map +1 -1
- package/dist/size-event.js.map +1 -1
- package/dist/strategies/component-strategy.d.ts +2 -2
- package/dist/strategies/component-strategy.js.map +1 -1
- package/dist/strategies/env-strategy.js.map +1 -1
- package/dist/strategies/generate-component-link.js.map +1 -1
- package/dist/strategies/index.js.map +1 -1
- package/dist/strategies/strategies-names.js.map +1 -1
- package/dist/types/preview-module.js.map +1 -1
- package/dist/webpack/webpack.config.js.map +1 -1
- package/package.json +23 -23
- package/dist/preview-1709867881461.js +0 -7
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_toolboxPath","data","require","generateComponentLink","modules","links","map","prefix","paths","name","entries","path","idx","toWindowsCompatiblePath","linkName","importStr","join","exportsString","entry","exportsMetadataString","filter","mod","metadata","JSON","stringify"],"sources":["generate-component-link.ts"],"sourcesContent":["import { toWindowsCompatiblePath } from '@teambit/toolbox.path.to-windows-compatible-path';\n\nexport type ModuleVar = {\n prefix: string;\n paths: string[];\n metadata?: unknown;\n};\n\nexport function generateComponentLink(modules: ModuleVar[]): string {\n const links = modules.map(({ prefix, paths }) => ({\n name: prefix,\n entries: paths.map((path, idx) => ({\n path: toWindowsCompatiblePath(path),\n linkName: `${prefix}_${idx}`,\n })),\n }));\n\n // import per preview file\n const importStr: string = links\n .map(({ entries }) => entries.map(({ path, linkName }) => `import * as ${linkName} from '${path}'`).join(';\\n'))\n .join(';\\n');\n\n // export files group per preview\n const exportsString: string = links\n .map(({ name, entries }) => `export const ${name} = [${entries.map((entry) => entry.linkName).join(', ')}]`)\n .join(';\\n');\n\n const exportsMetadataString: string = modules\n .filter((mod) => mod.metadata)\n .map((mod) => `export const ${mod.prefix}_metadata = ${JSON.stringify(mod.metadata)}`)\n .join(';\\n');\n\n return `${importStr};\n\n${exportsString};\n\n${exportsMetadataString};\n`;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAQO,SAASE,qBAAqBA,CAACC,OAAoB,EAAU;EAClE,MAAMC,KAAK,GAAGD,OAAO,CAACE,GAAG,CAAC,CAAC;IAAEC,MAAM;IAAEC;EAAM,CAAC,MAAM;IAChDC,IAAI,EAAEF,MAAM;IACZG,OAAO,EAAEF,KAAK,CAACF,GAAG,CAAC,CAACK,IAAI,EAAEC,GAAG,MAAM;MACjCD,IAAI,EAAE,IAAAE,sCAAuB,EAACF,IAAI,CAAC;MACnCG,QAAQ,EAAG,GAAEP,MAAO,IAAGK,GAAI;IAC7B,CAAC,CAAC;EACJ,CAAC,CAAC,CAAC;;EAEH;EACA,MAAMG,SAAiB,GAAGV,KAAK,CAC5BC,GAAG,CAAC,CAAC;IAAEI;EAAQ,CAAC,KAAKA,OAAO,CAACJ,GAAG,CAAC,CAAC;IAAEK,IAAI;IAAEG;EAAS,CAAC,KAAM,eAAcA,QAAS,UAASH,IAAK,GAAE,CAAC,CAACK,IAAI,CAAC,KAAK,CAAC,CAAC,CAC/GA,IAAI,CAAC,KAAK,CAAC;;EAEd;EACA,MAAMC,aAAqB,GAAGZ,KAAK,CAChCC,GAAG,CAAC,CAAC;IAAEG,IAAI;IAAEC;EAAQ,CAAC,KAAM,gBAAeD,IAAK,OAAMC,OAAO,CAACJ,GAAG,CAAEY,KAAK,IAAKA,KAAK,CAACJ,QAAQ,CAAC,CAACE,IAAI,CAAC,IAAI,CAAE,GAAE,CAAC,CAC3GA,IAAI,CAAC,KAAK,CAAC;EAEd,MAAMG,qBAA6B,GAAGf,OAAO,CAC1CgB,MAAM,CAAEC,GAAG,IAAKA,GAAG,CAACC,QAAQ,CAAC,CAC7BhB,GAAG,CAAEe,GAAG,IAAM,gBAAeA,GAAG,CAACd,MAAO,eAAcgB,IAAI,CAACC,SAAS,CAACH,GAAG,CAACC,QAAQ,CAAE,EAAC,CAAC,CACrFN,IAAI,CAAC,KAAK,CAAC;EAEd,OAAQ,GAAED,SAAU;AACtB;AACA,EAAEE,aAAc;AAChB;AACA,EAAEE,qBAAsB;AACxB,CAAC;AACD"}
|
1
|
+
{"version":3,"names":["_toolboxPath","data","require","generateComponentLink","modules","links","map","prefix","paths","name","entries","path","idx","toWindowsCompatiblePath","linkName","importStr","join","exportsString","entry","exportsMetadataString","filter","mod","metadata","JSON","stringify"],"sources":["generate-component-link.ts"],"sourcesContent":["import { toWindowsCompatiblePath } from '@teambit/toolbox.path.to-windows-compatible-path';\n\nexport type ModuleVar = {\n prefix: string;\n paths: string[];\n metadata?: unknown;\n};\n\nexport function generateComponentLink(modules: ModuleVar[]): string {\n const links = modules.map(({ prefix, paths }) => ({\n name: prefix,\n entries: paths.map((path, idx) => ({\n path: toWindowsCompatiblePath(path),\n linkName: `${prefix}_${idx}`,\n })),\n }));\n\n // import per preview file\n const importStr: string = links\n .map(({ entries }) => entries.map(({ path, linkName }) => `import * as ${linkName} from '${path}'`).join(';\\n'))\n .join(';\\n');\n\n // export files group per preview\n const exportsString: string = links\n .map(({ name, entries }) => `export const ${name} = [${entries.map((entry) => entry.linkName).join(', ')}]`)\n .join(';\\n');\n\n const exportsMetadataString: string = modules\n .filter((mod) => mod.metadata)\n .map((mod) => `export const ${mod.prefix}_metadata = ${JSON.stringify(mod.metadata)}`)\n .join(';\\n');\n\n return `${importStr};\n\n${exportsString};\n\n${exportsMetadataString};\n`;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAA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E,aAAc;AAChB;AACA,EAAEE,qBAAsB;AACxB,CAAC;AACD","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_envStrategy","data","require","_componentStrategy","_strategiesNames"],"sources":["index.ts"],"sourcesContent":["export { EnvBundlingStrategy, ENV_STRATEGY_ARTIFACT_NAME } from './env-strategy';\nexport {\n ComponentBundlingStrategy,\n COMPONENT_STRATEGY_ARTIFACT_NAME,\n COMPONENT_STRATEGY_SIZE_KEY_NAME,\n} from './component-strategy';\nexport { ENV_PREVIEW_STRATEGY_NAME, COMPONENT_PREVIEW_STRATEGY_NAME } from './strategies-names';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,mBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA"}
|
1
|
+
{"version":3,"names":["_envStrategy","data","require","_componentStrategy","_strategiesNames"],"sources":["index.ts"],"sourcesContent":["export { EnvBundlingStrategy, ENV_STRATEGY_ARTIFACT_NAME } from './env-strategy';\nexport {\n ComponentBundlingStrategy,\n COMPONENT_STRATEGY_ARTIFACT_NAME,\n COMPONENT_STRATEGY_SIZE_KEY_NAME,\n} from './component-strategy';\nexport { ENV_PREVIEW_STRATEGY_NAME, COMPONENT_PREVIEW_STRATEGY_NAME } from './strategies-names';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,mBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,gBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ENV_PREVIEW_STRATEGY_NAME","exports","COMPONENT_PREVIEW_STRATEGY_NAME"],"sources":["strategies-names.ts"],"sourcesContent":["export const ENV_PREVIEW_STRATEGY_NAME = 'env';\nexport const COMPONENT_PREVIEW_STRATEGY_NAME = 'component';\n"],"mappings":";;;;;;AAAO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,KAAK;AACvC,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,WAAW"}
|
1
|
+
{"version":3,"names":["ENV_PREVIEW_STRATEGY_NAME","exports","COMPONENT_PREVIEW_STRATEGY_NAME"],"sources":["strategies-names.ts"],"sourcesContent":["export const ENV_PREVIEW_STRATEGY_NAME = 'env';\nexport const COMPONENT_PREVIEW_STRATEGY_NAME = 'component';\n"],"mappings":";;;;;;AAAO,MAAMA,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,KAAK;AACvC,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,WAAW","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["preview-module.ts"],"sourcesContent":["export type { PreviewModule, ModuleFile } from '@teambit/preview.modules.preview-modules';\n"],"mappings":""}
|
1
|
+
{"version":3,"names":[],"sources":["preview-module.ts"],"sourcesContent":["export type { PreviewModule, ModuleFile } from '@teambit/preview.modules.preview-modules';\n"],"mappings":"","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reactWebpack","data","require","_webpack","_webpackMerge","_webpack2","_webpackManifestPlugin","createWebpackConfig","outputDir","entryFile","baseConfig","configBaseFactory","preBundleConfig","createPreBundleConfig","combined","merge","mode","process","env","BIT_DEBUG_PREVIEW_BUNDLE","stats","children","errorDetails","entry","main","resolve","alias","react","fallback","module","path","fallbacks","dgram","dns","fs","stream","http2","net","tls","child_process","output","publicPath","chunkFilename","filename","library","type","externalsType","externals","plugins","WebpackManifestPlugin","fileName","generate","seed","files","entrypoints","manifestFiles","reduce","manifest","file","name","entrypointFiles","filter","endsWith","ProvidePlugin","fallbacksProvidePluginConfig"],"sources":["webpack.config.ts"],"sourcesContent":["import { configBaseFactory } from '@teambit/react.webpack.react-webpack';\n\nimport { Configuration, ProvidePlugin } from 'webpack';\nimport { merge } from 'webpack-merge';\nimport { fallbacksProvidePluginConfig, fallbacks } from '@teambit/webpack';\nimport { WebpackManifestPlugin } from 'webpack-manifest-plugin';\n\nexport function createWebpackConfig(outputDir: string, entryFile: string): Configuration {\n const baseConfig = configBaseFactory(true);\n const preBundleConfig = createPreBundleConfig(outputDir, entryFile);\n\n // @ts-ignore that's an issue because of different types/webpack version\n const combined = merge(baseConfig, preBundleConfig);\n\n // @ts-ignore that's an issue because of different types/webpack version\n return combined;\n}\n\nfunction createPreBundleConfig(outputDir: string, entryFile: string) {\n const mode = process.env.BIT_DEBUG_PREVIEW_BUNDLE ? 'development' : 'production';\n const preBundleConfig: Configuration = {\n stats: {\n children: true,\n errorDetails: true,\n },\n mode,\n entry: {\n main: entryFile,\n },\n resolve: {\n alias: {\n 'react/jsx-runtime': require.resolve('react/jsx-runtime'),\n react: require.resolve('react'),\n 'react-dom': require.resolve('react-dom'),\n },\n fallback: {\n module: false,\n path: fallbacks.path,\n dgram: false,\n dns: false,\n fs: false,\n stream: false,\n http2: false,\n net: false,\n tls: false,\n child_process: false,\n process: fallbacks.process,\n },\n },\n output: {\n path: outputDir,\n publicPath: '/',\n chunkFilename: 'static/js/[name].[contenthash:8].chunk.cjs',\n filename: 'static/js/[name].[contenthash:8].cjs',\n library: {\n type: 'commonjs-static',\n },\n },\n externalsType: 'commonjs',\n externals: ['react', 'react-dom', '@mdx-js/react', '@teambit/mdx.ui.mdx-scope-context'],\n plugins: [\n // Generate an asset manifest file with the following content:\n // - \"files\" key: Mapping of all asset filenames to their corresponding\n // output file so that tools can pick it up without having to parse\n // `index.html`\n // can be used to reconstruct the HTML if necessary\n new WebpackManifestPlugin({\n fileName: 'asset-manifest.json',\n generate: (seed, files, entrypoints) => {\n const manifestFiles = files.reduce((manifest, file) => {\n manifest[file.name] = file.path;\n return manifest;\n }, seed);\n const entrypointFiles = entrypoints.main.filter((fileName) => !fileName.endsWith('.map'));\n\n // @ts-ignore - https://github.com/shellscape/webpack-manifest-plugin/issues/276\n return {\n files: manifestFiles,\n entrypoints: entrypointFiles,\n } as Record<string, string>;\n },\n }),\n\n new ProvidePlugin({ process: fallbacksProvidePluginConfig.process }),\n ],\n };\n\n return preBundleConfig;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,SAA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EAAE,KAAK;QACVC,GAAG,EAAE,KAAK;QACVC,aAAa,EAAE,KAAK;QACpBtB,OAAO,EAAEc,qBAAS,CAACd;MACrB;IACF,CAAC;IACDuB,MAAM,EAAE;MACNV,IAAI,EAAEtB,SAAS;MACfiC,UAAU,EAAE,GAAG;MACfC,aAAa,EAAE,4CAA4C;MAC3DC,QAAQ,EAAE,sCAAsC;MAChDC,OAAO,EAAE;QACPC,IAAI,EAAE;MACR;IACF,CAAC;IACDC,aAAa,EAAE,UAAU;IACzBC,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;IACvFC,OAAO,EAAE;IACP;IACA;IACA;IACA;IACA;IACA,KAAIC,8CAAqB,EAAC;MACxBC,QAAQ,EAAE,qBAAqB;MAC/BC,QAAQ,EAAEA,CAACC,IAAI,EAAEC,KAAK,EAAEC,WAAW,KAAK;QACtC,MAAMC,aAAa,GAAGF,KAAK,CAACG,MAAM,CAAC,CAACC,QAAQ,EAAEC,IAAI,KAAK;UACrDD,QAAQ,CAACC,IAAI,CAACC,IAAI,CAAC,GAAGD,IAAI,CAAC5B,IAAI;UAC/B,OAAO2B,QAAQ;QACjB,CAAC,EAAEL,IAAI,CAAC;QACR,MAAMQ,eAAe,GAAGN,WAAW,CAAC9B,IAAI,CAACqC,MAAM,CAAEX,QAAQ,IAAK,CAACA,QAAQ,CAACY,QAAQ,CAAC,MAAM,CAAC,CAAC;;QAEzF;QACA,OAAO;UACLT,KAAK,EAAEE,aAAa;UACpBD,WAAW,EAAEM;QACf,CAAC;MACH;IACF,CAAC,CAAC,EAEF,KAAIG,wBAAa,EAAC;MAAE9C,OAAO,EAAE+C,wCAA4B,CAAC/C;IAAQ,CAAC,CAAC;EAExE,CAAC;EAED,OAAOL,eAAe;AACxB"}
|
1
|
+
{"version":3,"names":["_reactWebpack","data","require","_webpack","_webpackMerge","_webpack2","_webpackManifestPlugin","createWebpackConfig","outputDir","entryFile","baseConfig","configBaseFactory","preBundleConfig","createPreBundleConfig","combined","merge","mode","process","env","BIT_DEBUG_PREVIEW_BUNDLE","stats","children","errorDetails","entry","main","resolve","alias","react","fallback","module","path","fallbacks","dgram","dns","fs","stream","http2","net","tls","child_process","output","publicPath","chunkFilename","filename","library","type","externalsType","externals","plugins","WebpackManifestPlugin","fileName","generate","seed","files","entrypoints","manifestFiles","reduce","manifest","file","name","entrypointFiles","filter","endsWith","ProvidePlugin","fallbacksProvidePluginConfig"],"sources":["webpack.config.ts"],"sourcesContent":["import { configBaseFactory } from '@teambit/react.webpack.react-webpack';\n\nimport { Configuration, ProvidePlugin } from 'webpack';\nimport { merge } from 'webpack-merge';\nimport { fallbacksProvidePluginConfig, fallbacks } from '@teambit/webpack';\nimport { WebpackManifestPlugin } from 'webpack-manifest-plugin';\n\nexport function createWebpackConfig(outputDir: string, entryFile: string): Configuration {\n const baseConfig = configBaseFactory(true);\n const preBundleConfig = createPreBundleConfig(outputDir, entryFile);\n\n // @ts-ignore that's an issue because of different types/webpack version\n const combined = merge(baseConfig, preBundleConfig);\n\n // @ts-ignore that's an issue because of different types/webpack version\n return combined;\n}\n\nfunction createPreBundleConfig(outputDir: string, entryFile: string) {\n const mode = process.env.BIT_DEBUG_PREVIEW_BUNDLE ? 'development' : 'production';\n const preBundleConfig: Configuration = {\n stats: {\n children: true,\n errorDetails: true,\n },\n mode,\n entry: {\n main: entryFile,\n },\n resolve: {\n alias: {\n 'react/jsx-runtime': require.resolve('react/jsx-runtime'),\n react: require.resolve('react'),\n 'react-dom': require.resolve('react-dom'),\n },\n fallback: {\n module: false,\n path: fallbacks.path,\n dgram: false,\n dns: false,\n fs: false,\n stream: false,\n http2: false,\n net: false,\n tls: false,\n child_process: false,\n process: fallbacks.process,\n },\n },\n output: {\n path: outputDir,\n publicPath: '/',\n chunkFilename: 'static/js/[name].[contenthash:8].chunk.cjs',\n filename: 'static/js/[name].[contenthash:8].cjs',\n library: {\n type: 'commonjs-static',\n },\n },\n externalsType: 'commonjs',\n externals: ['react', 'react-dom', '@mdx-js/react', '@teambit/mdx.ui.mdx-scope-context'],\n plugins: [\n // Generate an asset manifest file with the following content:\n // - \"files\" key: Mapping of all asset filenames to their corresponding\n // output file so that tools can pick it up without having to parse\n // `index.html`\n // can be used to reconstruct the HTML if necessary\n new WebpackManifestPlugin({\n fileName: 'asset-manifest.json',\n generate: (seed, files, entrypoints) => {\n const manifestFiles = files.reduce((manifest, file) => {\n manifest[file.name] = file.path;\n return manifest;\n }, seed);\n const entrypointFiles = entrypoints.main.filter((fileName) => !fileName.endsWith('.map'));\n\n // @ts-ignore - https://github.com/shellscape/webpack-manifest-plugin/issues/276\n return {\n files: manifestFiles,\n entrypoints: entrypointFiles,\n } as Record<string, string>;\n },\n }),\n\n new ProvidePlugin({ process: fallbacksProvidePluginConfig.process }),\n ],\n };\n\n return preBundleConfig;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,cAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,aAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,SAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,UAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,uBAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,sBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEO,SAASM,mBAAmBA,CAACC,SAAiB,EA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AsC;MAChDC,OAAO,EAAE;QACPC,IAAI,EAAE;MACR;IACF,CAAC;IACDC,aAAa,EAAE,UAAU;IACzBC,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;IACvFC,OAAO,EAAE;IACP;IACA;IACA;IACA;IACA;IACA,KAAIC,8CAAqB,EAAC;MACxBC,QAAQ,EAAE,qBAAqB;MAC/BC,QAAQ,EAAEA,CAACC,IAAI,EAAEC,KAAK,EAAEC,WAAW,KAAK;QACtC,MAAMC,aAAa,GAAGF,KAAK,CAACG,MAAM,CAAC,CAACC,QAAQ,EAAEC,IAAI,KAAK;UACrDD,QAAQ,CAACC,IAAI,CAACC,IAAI,CAAC,GAAGD,IAAI,CAAC5B,IAAI;UAC/B,OAAO2B,QAAQ;QACjB,CAAC,EAAEL,IAAI,CAAC;QACR,MAAMQ,eAAe,GAAGN,WAAW,CAAC9B,IAAI,CAACqC,MAAM,CAAEX,QAAQ,IAAK,CAACA,QAAQ,CAACY,QAAQ,CAAC,MAAM,CAAC,CAAC;;QAEzF;QACA,OAAO;UACLT,KAAK,EAAEE,aAAa;UACpBD,WAAW,EAAEM;QACf,CAAC;MACH;IACF,CAAC,CAAC,EAEF,KAAIG,wBAAa,EAAC;MAAE9C,OAAO,EAAE+C,wCAA4B,CAAC/C;IAAQ,CAAC,CAAC;EAExE,CAAC;EAED,OAAOL,eAAe;AACxB","ignoreList":[]}
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/preview",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.189",
|
4
4
|
"homepage": "https://bit.cloud/teambit/preview/preview",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.preview",
|
8
8
|
"name": "preview",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.189"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"mime": "2.5.2",
|
@@ -28,30 +28,30 @@
|
|
28
28
|
"@teambit/component-id": "1.2.0",
|
29
29
|
"@teambit/bit-error": "0.0.404",
|
30
30
|
"@teambit/react.webpack.react-webpack": "1.0.23",
|
31
|
-
"@teambit/express": "0.0.
|
32
|
-
"@teambit/logger": "0.0.
|
33
|
-
"@teambit/builder": "1.0.
|
34
|
-
"@teambit/bundler": "1.0.
|
35
|
-
"@teambit/component": "1.0.
|
31
|
+
"@teambit/express": "0.0.955",
|
32
|
+
"@teambit/logger": "0.0.949",
|
33
|
+
"@teambit/builder": "1.0.189",
|
34
|
+
"@teambit/bundler": "1.0.189",
|
35
|
+
"@teambit/component": "1.0.189",
|
36
36
|
"@teambit/preview.ui.component-preview": "1.0.5",
|
37
|
-
"@teambit/aspect-loader": "1.0.
|
38
|
-
"@teambit/cli": "0.0.
|
39
|
-
"@teambit/dependency-resolver": "1.0.
|
40
|
-
"@teambit/envs": "1.0.
|
37
|
+
"@teambit/aspect-loader": "1.0.189",
|
38
|
+
"@teambit/cli": "0.0.856",
|
39
|
+
"@teambit/dependency-resolver": "1.0.189",
|
40
|
+
"@teambit/envs": "1.0.189",
|
41
41
|
"@teambit/toolbox.path.to-windows-compatible-path": "0.0.496",
|
42
|
-
"@teambit/ui": "1.0.
|
43
|
-
"@teambit/isolator": "1.0.
|
42
|
+
"@teambit/ui": "1.0.189",
|
43
|
+
"@teambit/isolator": "1.0.189",
|
44
44
|
"@teambit/harmony.modules.harmony-root-generator": "0.0.4",
|
45
|
-
"@teambit/cache": "0.0.
|
46
|
-
"@teambit/graphql": "1.0.
|
47
|
-
"@teambit/pkg": "1.0.
|
48
|
-
"@teambit/pubsub": "1.0.
|
49
|
-
"@teambit/scope": "1.0.
|
50
|
-
"@teambit/watcher": "1.0.
|
51
|
-
"@teambit/workspace": "1.0.
|
52
|
-
"@teambit/compiler": "1.0.
|
45
|
+
"@teambit/cache": "0.0.949",
|
46
|
+
"@teambit/graphql": "1.0.189",
|
47
|
+
"@teambit/pkg": "1.0.189",
|
48
|
+
"@teambit/pubsub": "1.0.189",
|
49
|
+
"@teambit/scope": "1.0.189",
|
50
|
+
"@teambit/watcher": "1.0.189",
|
51
|
+
"@teambit/workspace": "1.0.189",
|
52
|
+
"@teambit/compiler": "1.0.189",
|
53
53
|
"@teambit/preview.cli.webpack-events-listener": "0.0.175",
|
54
|
-
"@teambit/webpack": "1.0.
|
54
|
+
"@teambit/webpack": "1.0.189"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
57
|
"@types/mime": "2.0.3",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"chai": "4.3.0",
|
67
67
|
"@types/lodash.compact": "3.0.6",
|
68
68
|
"@types/mocha": "9.1.0",
|
69
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
69
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.27",
|
70
70
|
"@teambit/preview.aspect-docs.preview": "0.0.167"
|
71
71
|
},
|
72
72
|
"peerDependencies": {
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.preview_preview@1.0.187/dist/preview.composition.js';
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.preview_preview@1.0.187/dist/preview.docs.mdx';
|
3
|
-
|
4
|
-
export const compositions = [compositions_0];
|
5
|
-
export const overview = [overview_0];
|
6
|
-
|
7
|
-
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"}]};
|