@teambit/react 1.0.667 → 1.0.669

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.
Files changed (71) hide show
  1. package/apps/web/compute-results.ts +2 -2
  2. package/apps/web/deploy-context.ts +2 -2
  3. package/apps/web/react-app-options.ts +3 -3
  4. package/apps/web/react-build-result.ts +1 -1
  5. package/apps/web/react.app-type.ts +3 -3
  6. package/apps/web/react.application.ts +7 -6
  7. package/apps/web/ssr/ssr-express.ts +2 -2
  8. package/apps/web/webpack/mutators.ts +1 -1
  9. package/artifacts/env-template/public/{252.5a48d08a4efe6ac7073d.js → 252.2828fd5e6907402cf578.js} +2 -2
  10. package/artifacts/env-template/public/{977.2dc9f009f95933831eec.js → 883.ecce899a53efa1970783.js} +1 -1
  11. package/artifacts/env-template/public/assets-manifest.json +14 -14
  12. package/artifacts/env-template/public/{compositions.28d5bbd4971932cd3263.js → compositions.a3f62162801625721f14.js} +1 -1
  13. package/artifacts/env-template/public/compositions.html +1 -1
  14. package/artifacts/env-template/public/{overview.68b2658603ed9cc99c3c.js → overview.56e0d8412b7559d93669.js} +1 -1
  15. package/artifacts/env-template/public/overview.html +1 -1
  16. package/artifacts/env-template/public/peers.a6488e3376e63ff83ae4.js +1 -0
  17. package/artifacts/env-template/public/{preview-root.05f90bb5fbdee8df22bf.js → preview-root.253a56e967670ccca698.js} +1 -1
  18. package/artifacts/env-template/public/static/css/{252.cb193a47.css → 252.608595b5.css} +1 -1
  19. package/dist/apps/web/compute-results.d.ts +2 -2
  20. package/dist/apps/web/compute-results.js.map +1 -1
  21. package/dist/apps/web/deploy-context.d.ts +2 -2
  22. package/dist/apps/web/deploy-context.js.map +1 -1
  23. package/dist/apps/web/react-app-options.d.ts +3 -3
  24. package/dist/apps/web/react-app-options.js.map +1 -1
  25. package/dist/apps/web/react-build-result.d.ts +1 -1
  26. package/dist/apps/web/react-build-result.js.map +1 -1
  27. package/dist/apps/web/react.app-type.d.ts +3 -3
  28. package/dist/apps/web/react.app-type.js.map +1 -1
  29. package/dist/apps/web/react.application.d.ts +6 -6
  30. package/dist/apps/web/react.application.js.map +1 -1
  31. package/dist/apps/web/ssr/ssr-express.d.ts +2 -2
  32. package/dist/apps/web/ssr/ssr-express.js.map +1 -1
  33. package/dist/apps/web/webpack/mutators.d.ts +1 -1
  34. package/dist/apps/web/webpack/mutators.js.map +1 -1
  35. package/dist/{preview-1753809186996.js → preview-1753848836384.js} +2 -2
  36. package/dist/react.api.transformer.d.ts +3 -2
  37. package/dist/react.api.transformer.js.map +1 -1
  38. package/dist/react.env.d.ts +20 -19
  39. package/dist/react.env.js.map +1 -1
  40. package/dist/react.graphql.d.ts +2 -2
  41. package/dist/react.graphql.js.map +1 -1
  42. package/dist/react.main.runtime.d.ts +15 -16
  43. package/dist/react.main.runtime.js.map +1 -1
  44. package/dist/react.preview.runtime.d.ts +3 -3
  45. package/dist/react.preview.runtime.js.map +1 -1
  46. package/dist/react.schema.d.ts +2 -1
  47. package/dist/react.schema.js.map +1 -1
  48. package/dist/react.templates.d.ts +2 -2
  49. package/dist/react.templates.js.map +1 -1
  50. package/dist/react.ui.runtime.d.ts +3 -3
  51. package/dist/react.ui.runtime.js.map +1 -1
  52. package/dist/webpack/webpack.config.base.d.ts +1 -1
  53. package/dist/webpack/webpack.config.base.js.map +1 -1
  54. package/dist/webpack/webpack.config.base.prod.d.ts +1 -1
  55. package/dist/webpack/webpack.config.base.prod.js.map +1 -1
  56. package/dist/webpack/webpack.config.component.dev.d.ts +1 -1
  57. package/dist/webpack/webpack.config.component.dev.js.map +1 -1
  58. package/dist/webpack/webpack.config.component.prod.d.ts +1 -1
  59. package/dist/webpack/webpack.config.component.prod.js.map +1 -1
  60. package/dist/webpack/webpack.config.env.template.d.ts +1 -1
  61. package/dist/webpack/webpack.config.env.template.js.map +1 -1
  62. package/package.json +37 -37
  63. package/react.ui.runtime.tsx +6 -3
  64. package/webpack/webpack.config.base.prod.ts +1 -1
  65. package/webpack/webpack.config.base.ts +2 -1
  66. package/webpack/webpack.config.component.dev.ts +1 -1
  67. package/webpack/webpack.config.component.prod.ts +1 -1
  68. package/webpack/webpack.config.env.template.ts +1 -1
  69. package/artifacts/env-template/public/peers.b0ca54a195877a7bb2cd.js +0 -1
  70. /package/{compositions-1753809186996.js → compositions-1753848836384.js} +0 -0
  71. /package/{overview-1753809186996.js → overview-1753848836384.js} +0 -0
@@ -1,6 +1,6 @@
1
- import { CompositionsUI } from '@teambit/compositions';
2
- import { TesterUI } from '@teambit/tester';
3
- import { APIReferenceUI } from '@teambit/api-reference';
1
+ import type { CompositionsUI } from '@teambit/compositions';
2
+ import type { TesterUI } from '@teambit/tester';
3
+ import type { APIReferenceUI } from '@teambit/api-reference';
4
4
  export declare class ReactUI {
5
5
  static runtime: import("@teambit/harmony").RuntimeDefinition;
6
6
  static slots: never[];
@@ -1 +1 @@
1
- {"version":3,"names":["_react","data","_interopRequireDefault","require","_compositions","_ui","_tester","_reactInstructionsReact","_reactInstructionsReact2","_apiReference","_apiReferenceRenderers","_react2","_highlighterWidget","_react3","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ReactUI","provider","compositionsUI","testerUi","apiUI","reactUI","registerEmptyState","createElement","AddingTests","AddingCompositions","registerSchemaClasses","ReactSchema","registerAPINodeRenderer","reactRenderer","registerMenuWidget","location","content","HighlighterWidget","exports","UIRuntime","CompositionsAspect","TesterAspect","APIReferenceAspect","ReactAspect","addRuntime","_default"],"sources":["react.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport { CompositionsAspect, CompositionsUI } from '@teambit/compositions';\nimport { UIRuntime } from '@teambit/ui';\nimport { TesterAspect, TesterUI } from '@teambit/tester';\nimport { AddingTests } from '@teambit/react.instructions.react.adding-tests';\nimport { AddingCompositions } from '@teambit/react.instructions.react.adding-compositions';\nimport { APIReferenceAspect, APIReferenceUI } from '@teambit/api-reference';\nimport { reactRenderer } from '@teambit/api-reference.renderers.react';\n\nimport { ReactAspect } from './react.aspect';\nimport { HighlighterWidget } from './highlighter-widget';\nimport { ReactSchema } from './react.schema';\n\nexport class ReactUI {\n static runtime = UIRuntime;\n static slots = [];\n static dependencies = [CompositionsAspect, TesterAspect, APIReferenceAspect];\n\n static async provider([compositionsUI, testerUi, apiUI]: [CompositionsUI, TesterUI, APIReferenceUI]) {\n const reactUI = new ReactUI();\n testerUi.registerEmptyState(() => {\n return <AddingTests />;\n });\n compositionsUI.registerEmptyState(() => {\n return <AddingCompositions />;\n });\n\n apiUI.registerSchemaClasses(() => [ReactSchema]);\n apiUI.registerAPINodeRenderer([reactRenderer]);\n\n compositionsUI.registerMenuWidget({\n location: 'start',\n content: <HighlighterWidget />,\n });\n\n return reactUI;\n }\n}\n\nReactAspect.addRuntime(ReactUI);\n\nexport default ReactUI;\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,wBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,uBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA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eAAS;AAAArC,eAAA,CADfkB,OAAO,WAEH,EAAE;AAAAlB,eAAA,CAFNkB,OAAO,kBAGI,CAACoB,kCAAkB,EAAEC,sBAAY,EAAEC,kCAAkB,CAAC;AAuB9EC,qBAAW,CAACC,UAAU,CAACxB,OAAO,CAAC;AAAC,IAAAyB,QAAA,GAAAP,OAAA,CAAArC,OAAA,GAEjBmB,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["_react","data","_interopRequireDefault","require","_compositions","_ui","_tester","_reactInstructionsReact","_reactInstructionsReact2","_apiReference","_apiReferenceRenderers","_react2","_highlighterWidget","_react3","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ReactUI","provider","compositionsUI","testerUi","apiUI","reactUI","registerEmptyState","createElement","AddingTests","AddingCompositions","registerSchemaClasses","ReactSchema","registerAPINodeRenderer","reactRenderer","registerMenuWidget","location","content","HighlighterWidget","exports","UIRuntime","CompositionsAspect","TesterAspect","APIReferenceAspect","ReactAspect","addRuntime","_default"],"sources":["react.ui.runtime.tsx"],"sourcesContent":["import React from 'react';\nimport type { CompositionsUI } from '@teambit/compositions';\nimport { CompositionsAspect } from '@teambit/compositions';\nimport { UIRuntime } from '@teambit/ui';\nimport type { TesterUI } from '@teambit/tester';\nimport { TesterAspect } from '@teambit/tester';\nimport { AddingTests } from '@teambit/react.instructions.react.adding-tests';\nimport { AddingCompositions } from '@teambit/react.instructions.react.adding-compositions';\nimport type { APIReferenceUI } from '@teambit/api-reference';\nimport { APIReferenceAspect } from '@teambit/api-reference';\nimport { reactRenderer } from '@teambit/api-reference.renderers.react';\n\nimport { ReactAspect } from './react.aspect';\nimport { HighlighterWidget } from './highlighter-widget';\nimport { ReactSchema } from './react.schema';\n\nexport class ReactUI {\n static runtime = UIRuntime;\n static slots = [];\n static dependencies = [CompositionsAspect, TesterAspect, APIReferenceAspect];\n\n static async provider([compositionsUI, testerUi, apiUI]: [CompositionsUI, TesterUI, APIReferenceUI]) {\n const reactUI = new ReactUI();\n testerUi.registerEmptyState(() => {\n return <AddingTests />;\n });\n compositionsUI.registerEmptyState(() => {\n return <AddingCompositions />;\n });\n\n apiUI.registerSchemaClasses(() => [ReactSchema]);\n apiUI.registerAPINodeRenderer([reactRenderer]);\n\n compositionsUI.registerMenuWidget({\n location: 'start',\n content: <HighlighterWidget />,\n });\n\n return reactUI;\n }\n}\n\nReactAspect.addRuntime(ReactUI);\n\nexport default ReactUI;\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,IAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,GAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,QAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,OAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,wBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,uBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,yBAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,wBAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAQ,cAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,aAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA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GAEjBmB,OAAO","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import 'style-loader';
2
- import { Configuration } from 'webpack';
2
+ import type { Configuration } from 'webpack';
3
3
  import '@teambit/react.babel.bit-react-transformer';
4
4
  import '@teambit/mdx.modules.mdx-loader';
5
5
  export default function (isEnvProduction?: boolean): Configuration;
@@ -1 +1 @@
1
- {"version":3,"names":["_lodash","data","require","_path","_miniCssExtractPlugin","_interopRequireDefault","_getCSSModuleLocalIdent","_webpack","stylesRegexps","_interopRequireWildcard","_webpackModules2","_postcss","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","styleLoaderPath","resolve","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","_default","isEnvProduction","isEnvProductionProfile","argv","includes","baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","postCssLoaderPath","postCssConfig","extensions","map","ext","alias","module","strictExportPresence","rules","test","fullySpecified","oneOf","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","exclude","options","babelrc","configFile","presets","cacheDirectory","cacheCompression","compact","cssModuleRegex","modules","getLocalIdent","getCSSModuleLocalIdent","sassNoModuleRegex","preProcessOptions","resolveUrlLoaderPath","preProcessorPath","sassModuleRegex","lessNoModuleRegex","lessModuleRegex","type","parser","dataUrlCondition","maxSize","generator","filename","dependency","not","titleProp","ref","plugins","chunkFilename","IgnorePlugin","resourceRegExp","RegExp","sep","contextRegExp","Boolean","performance"],"sources":["webpack.config.base.ts"],"sourcesContent":["import { merge } from 'lodash';\nimport { sep } from 'path';\nimport 'style-loader';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';\nimport { Configuration, IgnorePlugin } from 'webpack';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';\nimport { postCssConfig } from './postcss.config';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n// Make sure the mdx-loader is a dependency\nimport '@teambit/mdx.modules.mdx-loader';\n\nconst styleLoaderPath = require.resolve('style-loader');\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'cjs',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\n 'mdx',\n 'md',\n];\n\n// Source maps are resource heavy and can cause out of memory issue for large source files.\nconst shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';\n\nconst imageInlineSizeLimit = parseInt(process.env.IMAGE_INLINE_SIZE_LIMIT || '10000');\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (isEnvProduction = false): Configuration {\n // Variable used for enabling profiling in Production\n // passed into alias object. Uses a flag if passed into the build command\n const isEnvProductionProfile = process.argv.includes('--profile');\n\n const baseStyleLoadersOptions = {\n injectingLoader: isEnvProduction ? MiniCssExtractPlugin.loader : styleLoaderPath,\n cssLoaderPath: require.resolve('css-loader'),\n postCssLoaderPath: require.resolve('postcss-loader'),\n postCssConfig,\n };\n\n // We will provide `paths.publicUrlOrPath` to our app\n // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.\n // Get environment variables to inject into our app.\n // const env = getClientEnvironment(publicUrlOrPath.slice(0, -1));\n\n return {\n // TODO: make the dev tool according to shouldUseSourceMap and isEnvProduction\n // devtool: 'eval-cheap-module-source-map',\n resolve: {\n // These are the reasonable defaults supported by the Node ecosystem.\n // We also include JSX as a common component filename extension to support\n // some tools, although we do not recommend using it, see:\n // https://github.com/facebook/create-react-app/issues/290\n // `web` extension prefixes have been added for better support\n // for React Native Web.\n extensions: moduleFileExtensions.map((ext) => `.${ext}`),\n\n alias: {\n 'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime'),\n 'react/jsx-runtime': require.resolve('react/jsx-runtime'),\n 'react-dom/server': require.resolve('react-dom/server'),\n // Allows for better profiling with ReactDevTools\n ...(isEnvProductionProfile && {\n 'react-dom$': 'react-dom/profiling',\n 'scheduler/tracing': 'scheduler/tracing-profiling',\n }),\n },\n },\n module: {\n strictExportPresence: true,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n // \"oneOf\" will traverse all following loaders until one will\n // match the requirements. When no loader matches it will fall\n // back to the \"file\" loader at the end of the loader list.\n oneOf: [\n // \"postcss\" loader applies autoprefixer to our CSS.\n // \"css\" loader resolves paths in CSS and adds assets as dependencies.\n // \"style\" loader turns CSS into JS modules that inject <style> tags.\n // In production, we use MiniCSSExtractPlugin to extract that CSS\n // to a file, but in development \"style\" loader enables hot editing\n // of CSS.\n // By default we support CSS Modules with the extension .module.css\n {\n test: stylesRegexps.cssNoModulesRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n\n // Process application JS with Babel.\n // The preset includes JSX, Flow, TypeScript, and some ESnext features.\n {\n test: /\\.(js|mjs|jsx|ts|tsx)$/,\n exclude: [/node_modules/, /\\/dist\\//],\n // consider: limit loader to files only in a capsule that has bitid in package.json\n // descriptionData: { componentId: ComponentID.isValidObject },\n // // or\n // include: capsulePaths\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-env'), require.resolve('@babel/preset-react')],\n // This is a feature of `babel-loader` for webpack (not Babel itself).\n // It enables caching results in ./node_modules/.cache/babel-loader/\n // directory for faster rebuilds.\n cacheDirectory: true,\n // See #6846 for context on why cacheCompression is disabled\n cacheCompression: false,\n compact: isEnvProduction,\n },\n },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n exclude: [/node_modules/],\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-env'), require.resolve('@babel/preset-react')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n // Adds support for CSS Modules (https://github.com/css-modules/css-modules)\n // using the extension .module.css\n {\n test: stylesRegexps.cssModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n })\n ),\n },\n // Opt-in support for SASS (using .scss or .sass extensions).\n // By default we support SASS Modules with the\n // extensions .module.scss or .module.sass\n {\n test: stylesRegexps.sassNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n // Adds support for CSS Modules, but using SASS\n // using the extension .module.scss or .module.sass\n {\n test: stylesRegexps.sassModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n },\n {\n test: stylesRegexps.lessNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n {\n test: stylesRegexps.lessModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n },\n {\n test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/],\n type: 'asset',\n parser: {\n dataUrlCondition: {\n maxSize: imageInlineSizeLimit,\n },\n },\n generator: {\n filename: 'static/images/[hash][ext][query]',\n },\n },\n {\n // loads svg as both inlineUrl and react component, like:\n // import starUrl, { ReactComponent as StarIcon } from './star.svg';\n // (remove when there is native support for both opitons from webpack5 / svgr)\n test: /\\.svg$/,\n oneOf: [\n {\n dependency: { not: ['url'] }, // exclude new URL calls\n use: [\n {\n loader: require.resolve('@svgr/webpack'),\n options: { titleProp: true, ref: true },\n },\n require.resolve('new-url-loader'),\n ],\n },\n {\n type: 'asset', // export a data URI or emit a separate file\n },\n ],\n },\n {\n test: /\\.(woff(2)?|ttf|eot|svg)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n type: 'asset',\n generator: {\n filename: 'static/fonts/[hash][ext][query]',\n },\n },\n\n // \"file\" loader makes sure those assets get served by WebpackDevServer.\n // When you `import` an asset, you get its (virtual) filename.\n // In production, they would get copied to the `build` folder.\n // This loader doesn't use a \"test\" so it will catch all modules\n // that fall through the other loaders.\n {\n // Exclude `js` files to keep \"css\" loader working as it injects\n // its runtime that would otherwise be processed through \"file\" loader.\n // Also exclude `html` and `json` extensions so they get processed\n // by webpacks internal loaders.\n exclude: [/\\.(js|mjs|cjs|jsx|ts|tsx)$/, /\\.html$/, /\\.mdx?/, /\\.json$/, /\\.css$/],\n generator: {\n filename: 'static/[hash][ext][query]',\n },\n type: 'asset',\n },\n // ** STOP ** Are you adding a new loader?\n // Make sure to add the new loader(s) before the \"type:asset\" loader.\n ],\n },\n ],\n },\n // @ts-ignore\n plugins: [\n isEnvProduction &&\n new MiniCssExtractPlugin({\n // Options similar to the same options in webpackOptions.output\n // both options are optional\n filename: 'static/css/[name].[contenthash:8].css',\n chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',\n }),\n // Moment.js is an extremely popular library that bundles large locale files\n // by default due to how webpack interprets its code. This is a practical\n // solution that requires the user to opt into importing specific locales.\n // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n // You can remove this if you don't use Moment.js:\n new IgnorePlugin({\n resourceRegExp: new RegExp(`^\\\\.${sep}locale$`),\n contextRegExp: /moment$/,\n }),\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACAC,OAAA;AACA,SAAAE,sBAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAE,qBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,wBAAA;EAAA,MAAAL,IAAA,GAAAI,sBAAA,CAAAH,OAAA;EAAAI,uBAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,cAAA;EAAA,MAAAP,IAAA,GAAAQ,uBAAA,CAAAP,OAAA;EAAAM,aAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAS,iBAAA;EAAA,MAAAT,IAAA,GAAAC,OAAA;EAAAQ,gBAAA,YAAAA,CAAA;IAAA,OAAAT,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAU,SAAA;EAAA,MAAAV,IAAA,GAAAC,OAAA;EAAAS,QAAA,YAAAA,CAAA;IAAA,OAAAV,IAAA;EAAA;EAAA,O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G,EAAE,CACH;cACEf,MAAM,EAAEzE,OAAO,CAACwD,OAAO,CAAC,eAAe,CAAC;cACxCwC,OAAO,EAAE;gBAAE0B,SAAS,EAAE,IAAI;gBAAEC,GAAG,EAAE;cAAK;YACxC,CAAC,EACD3H,OAAO,CAACwD,OAAO,CAAC,gBAAgB,CAAC;UAErC,CAAC,EACD;YACE0D,IAAI,EAAE,OAAO,CAAE;UACjB,CAAC;QAEL,CAAC,EACD;UACE9B,IAAI,EAAE,+CAA+C;UACrD8B,IAAI,EAAE,OAAO;UACbI,SAAS,EAAE;YACTC,QAAQ,EAAE;UACZ;QACF,CAAC;QAED;QACA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACAxB,OAAO,EAAE,CAAC,4BAA4B,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;UACjFuB,SAAS,EAAE;YACTC,QAAQ,EAAE;UACZ,CAAC;UACDL,IAAI,EAAE;QACR;QACA;QACA;QAAA;MAEJ,CAAC;IAEL,CAAC;IACD;IACAU,OAAO,EAAE,CACP1D,eAAe,IACb,KAAIM,+BAAoB,EAAC;MACvB;MACA;MACA+C,QAAQ,EAAE,uCAAuC;MACjDM,aAAa,EAAE;IACjB,CAAC,CAAC;IACJ;IACA;IACA;IACA;IACA;IACA,KAAIC,uBAAY,EAAC;MACfC,cAAc,EAAE,IAAIC,MAAM,CAAC,OAAOC,WAAG,SAAS,CAAC;MAC/CC,aAAa,EAAE;IACjB,CAAC,CAAC,CACH,CAAChG,MAAM,CAACiG,OAAO,CAAC;IACjB;IACA;IACAC,WAAW,EAAE;EACf,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_lodash","data","require","_path","_miniCssExtractPlugin","_interopRequireDefault","_getCSSModuleLocalIdent","_webpack","stylesRegexps","_interopRequireWildcard","_webpackModules2","_postcss","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","styleLoaderPath","resolve","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","_default","isEnvProduction","isEnvProductionProfile","argv","includes","baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","postCssLoaderPath","postCssConfig","extensions","map","ext","alias","module","strictExportPresence","rules","test","fullySpecified","oneOf","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","exclude","options","babelrc","configFile","presets","cacheDirectory","cacheCompression","compact","cssModuleRegex","modules","getLocalIdent","getCSSModuleLocalIdent","sassNoModuleRegex","preProcessOptions","resolveUrlLoaderPath","preProcessorPath","sassModuleRegex","lessNoModuleRegex","lessModuleRegex","type","parser","dataUrlCondition","maxSize","generator","filename","dependency","not","titleProp","ref","plugins","chunkFilename","IgnorePlugin","resourceRegExp","RegExp","sep","contextRegExp","Boolean","performance"],"sources":["webpack.config.base.ts"],"sourcesContent":["import { merge } from 'lodash';\nimport { sep } from 'path';\nimport 'style-loader';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';\nimport type { Configuration } from 'webpack';\nimport { IgnorePlugin } from 'webpack';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';\nimport { postCssConfig } from './postcss.config';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n// Make sure the mdx-loader is a dependency\nimport '@teambit/mdx.modules.mdx-loader';\n\nconst styleLoaderPath = require.resolve('style-loader');\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'cjs',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\n 'mdx',\n 'md',\n];\n\n// Source maps are resource heavy and can cause out of memory issue for large source files.\nconst shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';\n\nconst imageInlineSizeLimit = parseInt(process.env.IMAGE_INLINE_SIZE_LIMIT || '10000');\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (isEnvProduction = false): Configuration {\n // Variable used for enabling profiling in Production\n // passed into alias object. Uses a flag if passed into the build command\n const isEnvProductionProfile = process.argv.includes('--profile');\n\n const baseStyleLoadersOptions = {\n injectingLoader: isEnvProduction ? MiniCssExtractPlugin.loader : styleLoaderPath,\n cssLoaderPath: require.resolve('css-loader'),\n postCssLoaderPath: require.resolve('postcss-loader'),\n postCssConfig,\n };\n\n // We will provide `paths.publicUrlOrPath` to our app\n // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.\n // Get environment variables to inject into our app.\n // const env = getClientEnvironment(publicUrlOrPath.slice(0, -1));\n\n return {\n // TODO: make the dev tool according to shouldUseSourceMap and isEnvProduction\n // devtool: 'eval-cheap-module-source-map',\n resolve: {\n // These are the reasonable defaults supported by the Node ecosystem.\n // We also include JSX as a common component filename extension to support\n // some tools, although we do not recommend using it, see:\n // https://github.com/facebook/create-react-app/issues/290\n // `web` extension prefixes have been added for better support\n // for React Native Web.\n extensions: moduleFileExtensions.map((ext) => `.${ext}`),\n\n alias: {\n 'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime'),\n 'react/jsx-runtime': require.resolve('react/jsx-runtime'),\n 'react-dom/server': require.resolve('react-dom/server'),\n // Allows for better profiling with ReactDevTools\n ...(isEnvProductionProfile && {\n 'react-dom$': 'react-dom/profiling',\n 'scheduler/tracing': 'scheduler/tracing-profiling',\n }),\n },\n },\n module: {\n strictExportPresence: true,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n // \"oneOf\" will traverse all following loaders until one will\n // match the requirements. When no loader matches it will fall\n // back to the \"file\" loader at the end of the loader list.\n oneOf: [\n // \"postcss\" loader applies autoprefixer to our CSS.\n // \"css\" loader resolves paths in CSS and adds assets as dependencies.\n // \"style\" loader turns CSS into JS modules that inject <style> tags.\n // In production, we use MiniCSSExtractPlugin to extract that CSS\n // to a file, but in development \"style\" loader enables hot editing\n // of CSS.\n // By default we support CSS Modules with the extension .module.css\n {\n test: stylesRegexps.cssNoModulesRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n\n // Process application JS with Babel.\n // The preset includes JSX, Flow, TypeScript, and some ESnext features.\n {\n test: /\\.(js|mjs|jsx|ts|tsx)$/,\n exclude: [/node_modules/, /\\/dist\\//],\n // consider: limit loader to files only in a capsule that has bitid in package.json\n // descriptionData: { componentId: ComponentID.isValidObject },\n // // or\n // include: capsulePaths\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-env'), require.resolve('@babel/preset-react')],\n // This is a feature of `babel-loader` for webpack (not Babel itself).\n // It enables caching results in ./node_modules/.cache/babel-loader/\n // directory for faster rebuilds.\n cacheDirectory: true,\n // See #6846 for context on why cacheCompression is disabled\n cacheCompression: false,\n compact: isEnvProduction,\n },\n },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n exclude: [/node_modules/],\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-env'), require.resolve('@babel/preset-react')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n // Adds support for CSS Modules (https://github.com/css-modules/css-modules)\n // using the extension .module.css\n {\n test: stylesRegexps.cssModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n })\n ),\n },\n // Opt-in support for SASS (using .scss or .sass extensions).\n // By default we support SASS Modules with the\n // extensions .module.scss or .module.sass\n {\n test: stylesRegexps.sassNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n // Adds support for CSS Modules, but using SASS\n // using the extension .module.scss or .module.sass\n {\n test: stylesRegexps.sassModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n },\n {\n test: stylesRegexps.lessNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n {\n test: stylesRegexps.lessModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n },\n {\n test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/],\n type: 'asset',\n parser: {\n dataUrlCondition: {\n maxSize: imageInlineSizeLimit,\n },\n },\n generator: {\n filename: 'static/images/[hash][ext][query]',\n },\n },\n {\n // loads svg as both inlineUrl and react component, like:\n // import starUrl, { ReactComponent as StarIcon } from './star.svg';\n // (remove when there is native support for both opitons from webpack5 / svgr)\n test: /\\.svg$/,\n oneOf: [\n {\n dependency: { not: ['url'] }, // exclude new URL calls\n use: [\n {\n loader: require.resolve('@svgr/webpack'),\n options: { titleProp: true, ref: true },\n },\n require.resolve('new-url-loader'),\n ],\n },\n {\n type: 'asset', // export a data URI or emit a separate file\n },\n ],\n },\n {\n test: /\\.(woff(2)?|ttf|eot|svg)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n type: 'asset',\n generator: {\n filename: 'static/fonts/[hash][ext][query]',\n },\n },\n\n // \"file\" loader makes sure those assets get served by WebpackDevServer.\n // When you `import` an asset, you get its (virtual) filename.\n // In production, they would get copied to the `build` folder.\n // This loader doesn't use a \"test\" so it will catch all modules\n // that fall through the other loaders.\n {\n // Exclude `js` files to keep \"css\" loader working as it injects\n // its runtime that would otherwise be processed through \"file\" loader.\n // Also exclude `html` and `json` extensions so they get processed\n // by webpacks internal loaders.\n exclude: [/\\.(js|mjs|cjs|jsx|ts|tsx)$/, /\\.html$/, /\\.mdx?/, /\\.json$/, /\\.css$/],\n generator: {\n filename: 'static/[hash][ext][query]',\n },\n type: 'asset',\n },\n // ** STOP ** Are you adding a new loader?\n // Make sure to add the new loader(s) before the \"type:asset\" loader.\n ],\n },\n ],\n },\n // @ts-ignore\n plugins: [\n isEnvProduction &&\n new MiniCssExtractPlugin({\n // Options similar to the same options in webpackOptions.output\n // both options are optional\n filename: 'static/css/[name].[contenthash:8].css',\n chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',\n }),\n // Moment.js is an extremely popular library that bundles large locale files\n // by default due to how webpack interprets its code. This is a practical\n // solution that requires the user to opt into importing specific locales.\n // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n // You can remove this if you don't use Moment.js:\n new IgnorePlugin({\n resourceRegExp: new RegExp(`^\\\\.${sep}locale$`),\n contextRegExp: /moment$/,\n }),\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,MAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,KAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,I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;QACA;QACA;UACE;UACA;UACA;UACA;UACAxB,OAAO,EAAE,CAAC,4BAA4B,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;UACjFuB,SAAS,EAAE;YACTC,QAAQ,EAAE;UACZ,CAAC;UACDL,IAAI,EAAE;QACR;QACA;QACA;QAAA;MAEJ,CAAC;IAEL,CAAC;IACD;IACAU,OAAO,EAAE,CACP1D,eAAe,IACb,KAAIM,+BAAoB,EAAC;MACvB;MACA;MACA+C,QAAQ,EAAE,uCAAuC;MACjDM,aAAa,EAAE;IACjB,CAAC,CAAC;IACJ;IACA;IACA;IACA;IACA;IACA,KAAIC,uBAAY,EAAC;MACfC,cAAc,EAAE,IAAIC,MAAM,CAAC,OAAOC,WAAG,SAAS,CAAC;MAC/CC,aAAa,EAAE;IACjB,CAAC,CAAC,CACH,CAAChG,MAAM,CAACiG,OAAO,CAAC;IACjB;IACA;IACAC,WAAW,EAAE;EACf,CAAC;AACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { Configuration } from 'webpack';
1
+ import type { Configuration } from 'webpack';
2
2
  export default function (dev?: boolean): Configuration;
@@ -1 +1 @@
1
- {"version":3,"names":["_cssMinimizerWebpackPlugin","data","_interopRequireDefault","require","_terserWebpackPlugin","e","__esModule","default","_default","dev","optimization","undefined","minimize","minimizer","TerserPlugin","minify","esbuildMinify","terserOptions","minifyWhitespace","minifyIdentifiers","minifySyntax","CssMinimizerPlugin","minimizerOptions","preset","minifyFontValues","removeQuotes","plugins","filter","Boolean","performance"],"sources":["webpack.config.base.prod.ts"],"sourcesContent":["import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport { Configuration } from 'webpack';\n// import { WebpackManifestPlugin } from 'webpack-manifest-plugin';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (dev?: boolean): Configuration {\n const optimization = dev\n ? undefined\n : {\n minimize: true,\n minimizer: [\n new TerserPlugin({\n minify: TerserPlugin.esbuildMinify,\n // `terserOptions` options will be passed to `esbuild`\n // Link to options - https://esbuild.github.io/api/#minify\n // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use:\n terserOptions: {\n minify: false,\n minifyWhitespace: true,\n // We don't want to minify identifiers to enable easier debugging on remote scopes when there are preview issues\n minifyIdentifiers: false,\n // minifyIdentifiers: true,\n minifySyntax: true,\n },\n // terserOptions: {},\n }),\n\n // This is only used in production mode\n // new TerserPlugin({\n // extractComments: false,\n // terserOptions: {\n // parse: {\n // // We want terser to parse ecma 8 code. However, we don't want it\n // // to apply any minification steps that turns valid ecma 5 code\n // // into invalid ecma 5 code. This is why the 'compress' and 'output'\n // // sections only apply transformations that are ecma 5 safe\n // // https://github.com/facebook/create-react-app/pull/4234\n // ecma: 8,\n // },\n // compress: {\n // ecma: 5,\n // warnings: false,\n // // Disabled because of an issue with Uglify breaking seemingly valid code:\n // // https://github.com/facebook/create-react-app/issues/2376\n // // Pending further investigation:\n // // https://github.com/mishoo/UglifyJS2/issues/2011\n // comparisons: false,\n // // Disabled because of an issue with Terser breaking valid code:\n // // https://github.com/facebook/create-react-app/issues/5250\n // // Pending further investigation:\n // // https://github.com/terser-js/terser/issues/120\n // inline: 2,\n // },\n // mangle: {\n // safari10: true,\n // },\n // output: {\n // ecma: 5,\n // comments: false,\n // // Turned on because emoji and regex is not minified properly using default\n // // https://github.com/facebook/create-react-app/issues/2488\n // ascii_only: true,\n // },\n // },\n // }),\n new CssMinimizerPlugin({\n minimizerOptions: {\n preset: [\n 'default',\n {\n minifyFontValues: { removeQuotes: false },\n },\n ],\n },\n }),\n ],\n // Automatically split vendor and commons\n // https://twitter.com/wSokra/status/969633336732905474\n // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366\n // splitChunks: {\n // chunks: 'all',\n // name: false,\n // },\n // Keep the runtime chunk separated to enable long term caching\n // https://twitter.com/wSokra/status/969679223278505985\n // https://github.com/facebook/create-react-app/issues/5358\n // runtimeChunk: {\n // name: (entrypoint) => `runtime-${entrypoint.name}`,\n // },\n };\n\n return {\n optimization,\n\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 // publicPath: 'public',\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 // // @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 // Generate a service worker script that will precache, and keep up to date,\n // the HTML & assets that are part of the webpack build.\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,2BAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,0BAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,qBAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,oBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjD;;AAEA;AACA;AACA;AACe,SAAAG,SAAUC,GAAa,EAAiB;EACrD,MAAMC,YAAY,GAAGD,GAAG,GACpBE,SAAS,GACT;IACEC,QAAQ,EAAE,IAAI;IACdC,SAAS,EAAE,CACT,KAAIC,8BAAY,EAAC;MACfC,MAAM,EAAED,8BAAY,CAACE,aAAa;MAClC;MACA;MACA;MACAC,aAAa,EAAE;QACbF,MAAM,EAAE,KAAK;QACbG,gBAAgB,EAAE,IAAI;QACtB;QACAC,iBAAiB,EAAE,KAAK;QACxB;QACAC,YAAY,EAAE;MAChB;MACA;IACF,CAAC,CAAC;IAEF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,KAAIC,oCAAkB,EAAC;MACrBC,gBAAgB,EAAE;QAChBC,MAAM,EAAE,CACN,SAAS,EACT;UACEC,gBAAgB,EAAE;YAAEC,YAAY,EAAE;UAAM;QAC1C,CAAC;MAEL;IACF,CAAC,CAAC;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF,CAAC;EAEL,OAAO;IACLf,YAAY;IAEZgB,OAAO,EAAE;MACP;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IAAA,CACD,CAACC,MAAM,CAACC,OAAO,CAAC;IACjB;IACA;IACAC,WAAW,EAAE;EACf,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_cssMinimizerWebpackPlugin","data","_interopRequireDefault","require","_terserWebpackPlugin","e","__esModule","default","_default","dev","optimization","undefined","minimize","minimizer","TerserPlugin","minify","esbuildMinify","terserOptions","minifyWhitespace","minifyIdentifiers","minifySyntax","CssMinimizerPlugin","minimizerOptions","preset","minifyFontValues","removeQuotes","plugins","filter","Boolean","performance"],"sources":["webpack.config.base.prod.ts"],"sourcesContent":["import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport type { Configuration } from 'webpack';\n// import { WebpackManifestPlugin } from 'webpack-manifest-plugin';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (dev?: boolean): Configuration {\n const optimization = dev\n ? undefined\n : {\n minimize: true,\n minimizer: [\n new TerserPlugin({\n minify: TerserPlugin.esbuildMinify,\n // `terserOptions` options will be passed to `esbuild`\n // Link to options - https://esbuild.github.io/api/#minify\n // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use:\n terserOptions: {\n minify: false,\n minifyWhitespace: true,\n // We don't want to minify identifiers to enable easier debugging on remote scopes when there are preview issues\n minifyIdentifiers: false,\n // minifyIdentifiers: true,\n minifySyntax: true,\n },\n // terserOptions: {},\n }),\n\n // This is only used in production mode\n // new TerserPlugin({\n // extractComments: false,\n // terserOptions: {\n // parse: {\n // // We want terser to parse ecma 8 code. However, we don't want it\n // // to apply any minification steps that turns valid ecma 5 code\n // // into invalid ecma 5 code. This is why the 'compress' and 'output'\n // // sections only apply transformations that are ecma 5 safe\n // // https://github.com/facebook/create-react-app/pull/4234\n // ecma: 8,\n // },\n // compress: {\n // ecma: 5,\n // warnings: false,\n // // Disabled because of an issue with Uglify breaking seemingly valid code:\n // // https://github.com/facebook/create-react-app/issues/2376\n // // Pending further investigation:\n // // https://github.com/mishoo/UglifyJS2/issues/2011\n // comparisons: false,\n // // Disabled because of an issue with Terser breaking valid code:\n // // https://github.com/facebook/create-react-app/issues/5250\n // // Pending further investigation:\n // // https://github.com/terser-js/terser/issues/120\n // inline: 2,\n // },\n // mangle: {\n // safari10: true,\n // },\n // output: {\n // ecma: 5,\n // comments: false,\n // // Turned on because emoji and regex is not minified properly using default\n // // https://github.com/facebook/create-react-app/issues/2488\n // ascii_only: true,\n // },\n // },\n // }),\n new CssMinimizerPlugin({\n minimizerOptions: {\n preset: [\n 'default',\n {\n minifyFontValues: { removeQuotes: false },\n },\n ],\n },\n }),\n ],\n // Automatically split vendor and commons\n // https://twitter.com/wSokra/status/969633336732905474\n // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366\n // splitChunks: {\n // chunks: 'all',\n // name: false,\n // },\n // Keep the runtime chunk separated to enable long term caching\n // https://twitter.com/wSokra/status/969679223278505985\n // https://github.com/facebook/create-react-app/issues/5358\n // runtimeChunk: {\n // name: (entrypoint) => `runtime-${entrypoint.name}`,\n // },\n };\n\n return {\n optimization,\n\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 // publicPath: 'public',\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 // // @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 // Generate a service worker script that will precache, and keep up to date,\n // the HTML & assets that are part of the webpack build.\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,2BAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,0BAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,qBAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,oBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiD,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjD;;AAEA;AACA;AACA;AACe,SAAAG,SAAUC,GAAa,EAAiB;EACrD,MAAMC,YAAY,GAAGD,GAAG,GACpBE,SAAS,GACT;IACEC,QAAQ,EAAE,IAAI;IACdC,SAAS,EAAE,CACT,KAAIC,8BAAY,EAAC;MACfC,MAAM,EAAED,8BAAY,CAACE,aAAa;MAClC;MACA;MACA;MACAC,aAAa,EAAE;QACbF,MAAM,EAAE,KAAK;QACbG,gBAAgB,EAAE,IAAI;QACtB;QACAC,iBAAiB,EAAE,KAAK;QACxB;QACAC,YAAY,EAAE;MAChB;MACA;IACF,CAAC,CAAC;IAEF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,KAAIC,oCAAkB,EAAC;MACrBC,gBAAgB,EAAE;QAChBC,MAAM,EAAE,CACN,SAAS,EACT;UACEC,gBAAgB,EAAE;YAAEC,YAAY,EAAE;UAAM;QAC1C,CAAC;MAEL;IACF,CAAC,CAAC;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF,CAAC;EAEL,OAAO;IACLf,YAAY;IAEZgB,OAAO,EAAE;MACP;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IAAA,CACD,CAACC,MAAM,CAACC,OAAO,CAAC;IACjB;IACA;IACAC,WAAW,EAAE;EACf,CAAC;AACH","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import { Configuration } from 'webpack';
1
+ import type { Configuration } from 'webpack';
2
2
  import '@teambit/react.babel.bit-react-transformer';
3
3
  export default function (workDir: string, envId: string): Configuration;
@@ -1 +1 @@
1
- {"version":3,"names":["_path","data","_interopRequireDefault","require","_componentId","_reactRefreshWebpackPlugin","e","__esModule","default","matchNothingRegex","_default","workDir","envId","module","rules","test","enforce","include","path","join","descriptionData","componentId","value","use","resolve","ComponentID","isValidObject","loader","options","babelrc","configFile","plugins","compact","minified","presets","ReactRefreshWebpackPlugin","overlay","sockPath","entry"],"sources":["webpack.config.component.dev.ts"],"sourcesContent":["import path from 'path';\nimport { Configuration } from 'webpack';\nimport { ComponentID } from '@teambit/component-id';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\nimport ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';\n\nconst matchNothingRegex = 'a^';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\n// export default function (workDir: string, envId: string): Configuration {\nexport default function (workDir: string, envId: string): Configuration {\n return {\n module: {\n rules: [\n {\n test: /\\.js$/,\n enforce: 'pre',\n // limit loader to files in the current project,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: (value) => !!value },\n use: [require.resolve('source-map-loader')],\n },\n {\n test: /\\.js$/,\n // limit loader to files in the current project,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: ComponentID.isValidObject },\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n plugins: [\n require.resolve('react-refresh/babel'),\n // for component highlighting in preview.\n [require.resolve('@teambit/react.babel.bit-react-transformer')],\n ],\n // turn off all optimizations (only slow down for node_modules)\n compact: false,\n minified: false,\n },\n },\n ],\n },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: (value) => !!value },\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-react'), require.resolve('@babel/preset-env')],\n plugins: [require.resolve('react-refresh/babel')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n ],\n },\n plugins: [\n // No need here as we have `hot: true` in the dev server\n // new webpack.HotModuleReplacementPlugin({}),\n new ReactRefreshWebpackPlugin({\n overlay: {\n sockPath: `_hmr/${envId}`,\n // TODO - react-error-overlay not showing runtime errors - https://github.com/teambit/bit/issues/5452\n entry: require.resolve('./overlay/webpackHotDevClient'),\n module: require.resolve('./overlay/refreshOverlayInterop'),\n },\n\n // we use '@pmmmwh/react-refresh-webpack-plugin/loader' directly where relevant.\n // FYI, original defaults of the plugin are:\n // include: /\\.([cm]js|[jt]sx?|flow)$/i, exclude: /node_modules/,\n include: matchNothingRegex,\n }),\n ],\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGAE,OAAA;AACA,SAAAE,2BAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,0BAAA,YAAAA,CAAA;I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AS;QACf;QACAE,OAAO,EAAEC,eAAI,CAACC,IAAI,CAACR,OAAO,EAAE,cAAc,CAAC;QAC3C;QACAS,eAAe,EAAE;UAAEC,WAAW,EAAGC,KAAK,IAAK,CAAC,CAACA;QAAM,CAAC;QACpDC,GAAG,EAAE,CACHpB,OAAO,CAACqB,OAAO,CAAC,6CAA6C,CAAC,EAC9D;UACEG,MAAM,EAAExB,OAAO,CAACqB,OAAO,CAAC,cAAc,CAAC;UACvCI,OAAO,EAAE;YACPC,OAAO,EAAE,KAAK;YACdC,UAAU,EAAE,KAAK;YACjBI,OAAO,EAAE,CAAC/B,OAAO,CAACqB,OAAO,CAAC,qBAAqB,CAAC,EAAErB,OAAO,CAACqB,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACvFO,OAAO,EAAE,CAAC5B,OAAO,CAACqB,OAAO,CAAC,qBAAqB,CAAC;UAClD;QACF,CAAC,EACD;UACEG,MAAM,EAAExB,OAAO,CAACqB,OAAO,CAAC,iCAAiC;QAC3D,CAAC;MAEL,CAAC;IAEL,CAAC;IACDO,OAAO,EAAE;IACP;IACA;IACA,KAAII,oCAAyB,EAAC;MAC5BC,OAAO,EAAE;QACPC,QAAQ,EAAE,QAAQzB,KAAK,EAAE;QACzB;QACA0B,KAAK,EAAEnC,OAAO,CAACqB,OAAO,CAAC,+BAA+B,CAAC;QACvDX,MAAM,EAAEV,OAAO,CAACqB,OAAO,CAAC,iCAAiC;MAC3D,CAAC;MAED;MACA;MACA;MACAP,OAAO,EAAER;IACX,CAAC,CAAC;EAEN,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_path","data","_interopRequireDefault","require","_componentId","_reactRefreshWebpackPlugin","e","__esModule","default","matchNothingRegex","_default","workDir","envId","module","rules","test","enforce","include","path","join","descriptionData","componentId","value","use","resolve","ComponentID","isValidObject","loader","options","babelrc","configFile","plugins","compact","minified","presets","ReactRefreshWebpackPlugin","overlay","sockPath","entry"],"sources":["webpack.config.component.dev.ts"],"sourcesContent":["import path from 'path';\nimport type { Configuration } from 'webpack';\nimport { ComponentID } from '@teambit/component-id';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\nimport ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';\n\nconst matchNothingRegex = 'a^';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\n// export default function (workDir: string, envId: string): Configuration {\nexport default function (workDir: string, envId: string): Configuration {\n return {\n module: {\n rules: [\n {\n test: /\\.js$/,\n enforce: 'pre',\n // limit loader to files in the current project,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: (value) => !!value },\n use: [require.resolve('source-map-loader')],\n },\n {\n test: /\\.js$/,\n // limit loader to files in the current project,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: ComponentID.isValidObject },\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n plugins: [\n require.resolve('react-refresh/babel'),\n // for component highlighting in preview.\n [require.resolve('@teambit/react.babel.bit-react-transformer')],\n ],\n // turn off all optimizations (only slow down for node_modules)\n compact: false,\n minified: false,\n },\n },\n ],\n },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: (value) => !!value },\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-react'), require.resolve('@babel/preset-env')],\n plugins: [require.resolve('react-refresh/babel')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n ],\n },\n plugins: [\n // No need here as we have `hot: true` in the dev server\n // new webpack.HotModuleReplacementPlugin({}),\n new ReactRefreshWebpackPlugin({\n overlay: {\n sockPath: `_hmr/${envId}`,\n // TODO - react-error-overlay not showing runtime errors - https://github.com/teambit/bit/issues/5452\n entry: require.resolve('./overlay/webpackHotDevClient'),\n module: require.resolve('./overlay/refreshOverlayInterop'),\n },\n\n // we use '@pmmmwh/react-refresh-webpack-plugin/loader' directly where relevant.\n // FYI, original defaults of the plugin are:\n // include: /\\.([cm]js|[jt]sx?|flow)$/i, exclude: /node_modules/,\n include: matchNothingRegex,\n }),\n ],\n };\n}\n"],"mappings":";;;;;;AAAA,SAAAA,MAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,KAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGAE,OAAA;AACA,SAAAE,2BAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,0BAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA6E,SAAAC,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAH7E;AACA;;AAIA,MAAMG,iBAAiB,GAAG,IAAI;;AAE9B;AACA;AACA;AACA;AACe,SAAAC,SAAUC,OAAe,EAAEC,KAAa,EAAiB;EACtE,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE,CACL;QACEC,IAAI,E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U,EAAE,KAAK;YACjBI,OAAO,EAAE,CAAC/B,OAAO,CAACqB,OAAO,CAAC,qBAAqB,CAAC,EAAErB,OAAO,CAACqB,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACvFO,OAAO,EAAE,CAAC5B,OAAO,CAACqB,OAAO,CAAC,qBAAqB,CAAC;UAClD;QACF,CAAC,EACD;UACEG,MAAM,EAAExB,OAAO,CAACqB,OAAO,CAAC,iCAAiC;QAC3D,CAAC;MAEL,CAAC;IAEL,CAAC;IACDO,OAAO,EAAE;IACP;IACA;IACA,KAAII,oCAAyB,EAAC;MAC5BC,OAAO,EAAE;QACPC,QAAQ,EAAE,QAAQzB,KAAK,EAAE;QACzB;QACA0B,KAAK,EAAEnC,OAAO,CAACqB,OAAO,CAAC,+BAA+B,CAAC;QACvDX,MAAM,EAAEV,OAAO,CAACqB,OAAO,CAAC,iCAAiC;MAC3D,CAAC;MAED;MACA;MACA;MACAP,OAAO,EAAER;IACX,CAAC,CAAC;EAEN,CAAC;AACH","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import { Configuration } from 'webpack';
1
+ import type { Configuration } from 'webpack';
2
2
  import '@teambit/react.babel.bit-react-transformer';
3
3
  export default function (): Configuration;
@@ -1 +1 @@
1
- {"version":3,"names":["_componentId","data","require","_default","module","rules","test","include","exclude","descriptionData","componentId","ComponentID","isValidObject","use","loader","resolve","options","babelrc","configFile","plugins","compact","minified"],"sources":["webpack.config.component.prod.ts"],"sourcesContent":["import { Configuration } from 'webpack';\nimport { ComponentID } from '@teambit/component-id';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (): Configuration {\n return {\n module: {\n rules: [\n {\n test: /\\.js$/,\n include: [/node_modules/, /\\/dist\\//],\n exclude: /@teambit\\/legacy/,\n descriptionData: { componentId: ComponentID.isValidObject },\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n plugins: [\n // for component highlighting in preview.\n [require.resolve('@teambit/react.babel.bit-react-transformer')],\n ],\n // turn off all optimizations (only slow down for node_modules)\n compact: false,\n minified: false,\n },\n },\n ],\n },\n ],\n },\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGAC,OAAA;AAFA;AACA;;AAGA;AACA;AACA;AACe,SAAAC,SAAA,EAA2B;EACxC,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE,CACL;QACEC,IAAI,EAAE,OAAO;QACbC,OAAO,EAAE,CAAC,cAAc,EAAE,UAAU,CAAC;QACrCC,OAAO,EAAE,kBAAkB;QAC3BC,eAAe,EAAE;UAAEC,WAAW,EAAEC,0BAAW,CAACC;QAAc,CAAC;QAC3DC,GAAG,EAAE,CACH;UACEC,MAAM,EAAEZ,OAAO,CAACa,OAAO,CAAC,cAAc,CAAC;UACvCC,OAAO,EAAE;YACPC,OAAO,EAAE,KAAK;YACdC,UAAU,EAAE,KAAK;YACjBC,OAAO,EAAE;YACP;YACA,CAACjB,OAAO,CAACa,OAAO,CAAC,4CAA4C,CAAC,CAAC,CAChE;YACD;YACAK,OAAO,EAAE,KAAK;YACdC,QAAQ,EAAE;UACZ;QACF,CAAC;MAEL,CAAC;IAEL;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_componentId","data","require","_default","module","rules","test","include","exclude","descriptionData","componentId","ComponentID","isValidObject","use","loader","resolve","options","babelrc","configFile","plugins","compact","minified"],"sources":["webpack.config.component.prod.ts"],"sourcesContent":["import type { Configuration } from 'webpack';\nimport { ComponentID } from '@teambit/component-id';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (): Configuration {\n return {\n module: {\n rules: [\n {\n test: /\\.js$/,\n include: [/node_modules/, /\\/dist\\//],\n exclude: /@teambit\\/legacy/,\n descriptionData: { componentId: ComponentID.isValidObject },\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n plugins: [\n // for component highlighting in preview.\n [require.resolve('@teambit/react.babel.bit-react-transformer')],\n ],\n // turn off all optimizations (only slow down for node_modules)\n compact: false,\n minified: false,\n },\n },\n ],\n },\n ],\n },\n };\n}\n"],"mappings":";;;;;;AACA,SAAAA,aAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,YAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGAC,OAAA;AAFA;AACA;;AAGA;AACA;AACA;AACe,SAAAC,SAAA,EAA2B;EACxC,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE,CACL;QACEC,IAAI,EAAE,OAAO;QACbC,OAAO,EAAE,CAAC,cAAc,EAAE,UAAU,CAAC;QACrCC,OAAO,EAAE,kBAAkB;QAC3BC,eAAe,EAAE;UAAEC,WAAW,EAAEC,0BAAW,CAACC;QAAc,CAAC;QAC3DC,GAAG,EAAE,CACH;UACEC,MAAM,EAAEZ,OAAO,CAACa,OAAO,CAAC,cAAc,CAAC;UACvCC,OAAO,EAAE;YACPC,OAAO,EAAE,KAAK;YACdC,UAAU,EAAE,KAAK;YACjBC,OAAO,EAAE;YACP;YACA,CAACjB,OAAO,CAACa,OAAO,CAAC,4CAA4C,CAAC,CAAC,CAChE;YACD;YACAK,OAAO,EAAE,KAAK;YACdC,QAAQ,EAAE;UACZ;QACF,CAAC;MAEL,CAAC;IAEL;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { Configuration } from 'webpack';
1
+ import type { Configuration } from 'webpack';
2
2
  export declare function templateWebpackConfigFactory(): Configuration;
@@ -1 +1 @@
1
- {"version":3,"names":["templateWebpackConfigFactory","name","output","filename","chunkLoadingGlobal"],"sources":["webpack.config.env.template.ts"],"sourcesContent":["import { Configuration } from 'webpack';\n\nexport function templateWebpackConfigFactory(): Configuration {\n return {\n name: 'react.env-template',\n output: {\n filename: '[name].[chunkhash].js',\n // might run into this error, when running multiple chunks created by different webpack builds:\n // \"Uncaught TypeError: __webpack_require__.n is not a function\"\n // this is because each build creates its own runtime, and they compete on the same global name.\n // setting a separate global name for the template ensures it will not conflict with preview chunks loaded in runtime\n chunkLoadingGlobal: '__loadChunks_EnvTemplate',\n },\n };\n}\n"],"mappings":";;;;;;AAEO,SAASA,4BAA4BA,CAAA,EAAkB;EAC5D,OAAO;IACLC,IAAI,EAAE,oBAAoB;IAC1BC,MAAM,EAAE;MACNC,QAAQ,EAAE,uBAAuB;MACjC;MACA;MACA;MACA;MACAC,kBAAkB,EAAE;IACtB;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["templateWebpackConfigFactory","name","output","filename","chunkLoadingGlobal"],"sources":["webpack.config.env.template.ts"],"sourcesContent":["import type { Configuration } from 'webpack';\n\nexport function templateWebpackConfigFactory(): Configuration {\n return {\n name: 'react.env-template',\n output: {\n filename: '[name].[chunkhash].js',\n // might run into this error, when running multiple chunks created by different webpack builds:\n // \"Uncaught TypeError: __webpack_require__.n is not a function\"\n // this is because each build creates its own runtime, and they compete on the same global name.\n // setting a separate global name for the template ensures it will not conflict with preview chunks loaded in runtime\n chunkLoadingGlobal: '__loadChunks_EnvTemplate',\n },\n };\n}\n"],"mappings":";;;;;;AAEO,SAASA,4BAA4BA,CAAA,EAAkB;EAC5D,OAAO;IACLC,IAAI,EAAE,oBAAoB;IAC1BC,MAAM,EAAE;MACNC,QAAQ,EAAE,uBAAuB;MACjC;MACA;MACA;MACA;MACAC,kBAAkB,EAAE;IACtB;EACF,CAAC;AACH","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/react",
3
- "version": "1.0.667",
3
+ "version": "1.0.669",
4
4
  "homepage": "https://bit.cloud/teambit/react/react",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.react",
8
8
  "name": "react",
9
- "version": "1.0.667"
9
+ "version": "1.0.669"
10
10
  },
11
11
  "dependencies": {
12
12
  "eslint": "8.56.0",
@@ -67,26 +67,26 @@
67
67
  "@teambit/design.ui.tooltip": "0.0.378",
68
68
  "@teambit/semantics.entities.semantic-schema": "0.0.89",
69
69
  "@teambit/harmony": "0.4.7",
70
- "@teambit/component.modules.component-url": "0.0.177",
70
+ "@teambit/component.modules.component-url": "0.0.178",
71
71
  "@teambit/defender.eslint-linter": "1.0.54",
72
- "@teambit/defender.eslint.config-mutator": "0.0.112",
72
+ "@teambit/defender.eslint.config-mutator": "0.0.113",
73
73
  "@teambit/defender.jest-tester": "2.0.17",
74
74
  "@teambit/defender.prettier-formatter": "1.0.23",
75
- "@teambit/defender.prettier.config-mutator": "0.0.106",
76
- "@teambit/react.ui.compositions-app": "0.0.24",
77
- "@teambit/react.ui.docs-app": "1.0.27",
78
- "@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.42",
75
+ "@teambit/defender.prettier.config-mutator": "0.0.107",
76
+ "@teambit/react.ui.compositions-app": "0.0.25",
77
+ "@teambit/react.ui.docs-app": "1.0.28",
78
+ "@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.43",
79
79
  "@teambit/toolbox.path.path": "0.0.8",
80
80
  "@teambit/typescript.typescript-compiler": "2.0.58",
81
- "@teambit/react.ui.highlighter-provider": "0.0.215",
81
+ "@teambit/react.ui.highlighter-provider": "0.0.216",
82
82
  "@bitdev/react.generators.react-templates": "4.0.2",
83
- "@teambit/api-reference.renderers.react": "0.0.59",
83
+ "@teambit/api-reference.renderers.react": "0.0.60",
84
84
  "@teambit/react.instructions.react.adding-compositions": "0.0.7",
85
85
  "@teambit/react.instructions.react.adding-tests": "0.0.6",
86
86
  "@teambit/react.eslint-config-bit-react": "1.0.243",
87
87
  "@teambit/dependencies.modules.packages-excluder": "1.0.8",
88
88
  "@teambit/react.jest.react-jest": "1.0.35",
89
- "@teambit/react.babel.bit-react-transformer": "1.0.35",
89
+ "@teambit/react.babel.bit-react-transformer": "1.0.36",
90
90
  "@teambit/webpack.modules.generate-style-loaders": "1.0.21",
91
91
  "@teambit/webpack.modules.style-regexps": "1.0.11",
92
92
  "@teambit/mdx.modules.mdx-loader": "1.0.15",
@@ -95,32 +95,32 @@
95
95
  "@teambit/toolbox.network.get-port": "1.0.10",
96
96
  "@teambit/react.rendering.ssr": "1.0.3",
97
97
  "@teambit/ui-foundation.ui.pages.static-error": "0.0.108",
98
- "@teambit/typescript": "1.0.667",
99
- "@teambit/builder": "1.0.667",
100
- "@teambit/bundler": "1.0.667",
101
- "@teambit/compiler": "1.0.667",
102
- "@teambit/component": "1.0.667",
103
- "@teambit/dependency-resolver": "1.0.667",
104
- "@teambit/dev-files": "1.0.667",
105
- "@teambit/envs": "1.0.667",
106
- "@teambit/formatter": "1.0.667",
107
- "@teambit/linter": "1.0.667",
108
- "@teambit/logger": "0.0.1337",
109
- "@teambit/pkg": "1.0.667",
110
- "@teambit/preview": "1.0.667",
111
- "@teambit/schema": "1.0.667",
112
- "@teambit/tester": "1.0.667",
113
- "@teambit/webpack": "1.0.667",
114
- "@teambit/worker": "0.0.1548",
115
- "@teambit/workspace-config-files": "1.0.667",
116
- "@teambit/workspace": "1.0.667",
117
- "@teambit/application": "1.0.667",
118
- "@teambit/cli": "0.0.1244",
119
- "@teambit/generator": "1.0.668",
120
- "@teambit/graphql": "1.0.667",
121
- "@teambit/api-reference": "1.0.667",
122
- "@teambit/compositions": "1.0.667",
123
- "@teambit/ui": "1.0.667"
98
+ "@teambit/typescript": "1.0.669",
99
+ "@teambit/builder": "1.0.669",
100
+ "@teambit/bundler": "1.0.669",
101
+ "@teambit/compiler": "1.0.669",
102
+ "@teambit/component": "1.0.669",
103
+ "@teambit/dependency-resolver": "1.0.669",
104
+ "@teambit/dev-files": "1.0.669",
105
+ "@teambit/envs": "1.0.669",
106
+ "@teambit/formatter": "1.0.669",
107
+ "@teambit/linter": "1.0.669",
108
+ "@teambit/logger": "0.0.1339",
109
+ "@teambit/pkg": "1.0.669",
110
+ "@teambit/preview": "1.0.669",
111
+ "@teambit/schema": "1.0.669",
112
+ "@teambit/tester": "1.0.669",
113
+ "@teambit/webpack": "1.0.669",
114
+ "@teambit/worker": "0.0.1550",
115
+ "@teambit/workspace-config-files": "1.0.669",
116
+ "@teambit/workspace": "1.0.669",
117
+ "@teambit/application": "1.0.669",
118
+ "@teambit/cli": "0.0.1246",
119
+ "@teambit/generator": "1.0.670",
120
+ "@teambit/graphql": "1.0.669",
121
+ "@teambit/api-reference": "1.0.669",
122
+ "@teambit/compositions": "1.0.669",
123
+ "@teambit/ui": "1.0.669"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@types/react": "^17.0.8",
@@ -1,10 +1,13 @@
1
1
  import React from 'react';
2
- import { CompositionsAspect, CompositionsUI } from '@teambit/compositions';
2
+ import type { CompositionsUI } from '@teambit/compositions';
3
+ import { CompositionsAspect } from '@teambit/compositions';
3
4
  import { UIRuntime } from '@teambit/ui';
4
- import { TesterAspect, TesterUI } from '@teambit/tester';
5
+ import type { TesterUI } from '@teambit/tester';
6
+ import { TesterAspect } from '@teambit/tester';
5
7
  import { AddingTests } from '@teambit/react.instructions.react.adding-tests';
6
8
  import { AddingCompositions } from '@teambit/react.instructions.react.adding-compositions';
7
- import { APIReferenceAspect, APIReferenceUI } from '@teambit/api-reference';
9
+ import type { APIReferenceUI } from '@teambit/api-reference';
10
+ import { APIReferenceAspect } from '@teambit/api-reference';
8
11
  import { reactRenderer } from '@teambit/api-reference.renderers.react';
9
12
 
10
13
  import { ReactAspect } from './react.aspect';
@@ -1,6 +1,6 @@
1
1
  import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
2
2
  import TerserPlugin from 'terser-webpack-plugin';
3
- import { Configuration } from 'webpack';
3
+ import type { Configuration } from 'webpack';
4
4
  // import { WebpackManifestPlugin } from 'webpack-manifest-plugin';
5
5
 
6
6
  // This is the production and development configuration.
@@ -3,7 +3,8 @@ import { sep } from 'path';
3
3
  import 'style-loader';
4
4
  import MiniCssExtractPlugin from 'mini-css-extract-plugin';
5
5
  import getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';
6
- import { Configuration, IgnorePlugin } from 'webpack';
6
+ import type { Configuration } from 'webpack';
7
+ import { IgnorePlugin } from 'webpack';
7
8
  import * as stylesRegexps from '@teambit/webpack.modules.style-regexps';
8
9
  import { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';
9
10
  import { postCssConfig } from './postcss.config';
@@ -1,5 +1,5 @@
1
1
  import path from 'path';
2
- import { Configuration } from 'webpack';
2
+ import type { Configuration } from 'webpack';
3
3
  import { ComponentID } from '@teambit/component-id';
4
4
  // Make sure the bit-react-transformer is a dependency
5
5
  // TODO: remove it once we can set policy from component to component then set it via the component.json
@@ -1,4 +1,4 @@
1
- import { Configuration } from 'webpack';
1
+ import type { Configuration } from 'webpack';
2
2
  import { ComponentID } from '@teambit/component-id';
3
3
  // Make sure the bit-react-transformer is a dependency
4
4
  // TODO: remove it once we can set policy from component to component then set it via the component.json
@@ -1,4 +1,4 @@
1
- import { Configuration } from 'webpack';
1
+ import type { Configuration } from 'webpack';
2
2
 
3
3
  export function templateWebpackConfigFactory(): Configuration {
4
4
  return {
@@ -1 +0,0 @@
1
- (()=>{"use strict";var __webpack_modules__={435:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__2)=>{var react__WEBPACK_IMPORTED_MODULE_2___namespace_cache,react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache,_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(47717),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(58860),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(37953),react_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(88705),globalObj=window;guard("TeambitMdxUiMdxScopeContext",_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__),guard("MdxJsReact",_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),guard("React",react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2))),guard("ReactDom",react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2))),globalObj.TeambitMdxUiMdxScopeContext=_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_0__,globalObj.MdxJsReact=_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__,globalObj.React=react__WEBPACK_IMPORTED_MODULE_2___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_2___namespace_cache=__webpack_require__2.t(react__WEBPACK_IMPORTED_MODULE_2__,2)),globalObj.ReactDom=react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache||(react_dom__WEBPACK_IMPORTED_MODULE_3___namespace_cache=__webpack_require__2.t(react_dom__WEBPACK_IMPORTED_MODULE_3__,2));function guard(property,expected){var existing=globalObj[property];if(existing===expected&&expected!==void 0)console.warn('[expose-peers] "'+property+'" already exists in global scope, but with correct value');else if(existing!==void 0)throw new Error('[expose-peers] "'+property+'" already exists in the global scope, cannot overwrite')}}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(priority&!1||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();r!==void 0&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,leafPrototypes;__webpack_require__.t=function(value,mode){if(mode&1&&(value=this(value)),mode&8||typeof value=="object"&&value&&(mode&4&&value.__esModule||mode&16&&typeof value.then=="function"))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=mode&2&&value;typeof current=="object"&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),(()=>{var installedChunks={626:0};__webpack_require__.O.j=chunkId=>installedChunks[chunkId]===0;var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var[chunkIds,moreModules,runtime]=data,moduleId,chunkId,i=0;if(chunkIds.some(id=>installedChunks[id]!==0)){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})();var __webpack_exports__=__webpack_require__.O(void 0,[320],()=>__webpack_require__(435));__webpack_exports__=__webpack_require__.O(__webpack_exports__)})();