@teambit/react 0.0.806 → 0.0.807

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 (46) hide show
  1. package/apps/web/compute-results.ts +3 -1
  2. package/apps/web/react-app-options.ts +5 -0
  3. package/apps/web/react-build-result.ts +1 -0
  4. package/apps/web/react.app-type.ts +1 -0
  5. package/apps/web/react.application.ts +61 -83
  6. package/apps/web/webpack/mutators.ts +68 -0
  7. package/apps/web/webpack/webpack.app.ssr.config.ts +24 -0
  8. package/artifacts/__bit_junit.xml +2 -2
  9. package/artifacts/env-template/public/{486.b4b503d786c3da312ae2.js → 502.1f3ad81d16d1a387ed6e.js} +2 -2
  10. package/artifacts/env-template/public/assets-manifest.json +12 -12
  11. package/artifacts/env-template/public/{compositions.70af3ab69b596fbcea59.js → compositions.1a2eae0121924a2382b5.js} +1 -1
  12. package/artifacts/env-template/public/compositions.html +1 -1
  13. package/artifacts/env-template/public/overview.4c90e935a13e148728cc.js +1 -0
  14. package/artifacts/env-template/public/overview.html +1 -1
  15. package/artifacts/env-template/public/{peers.3e4ebdb2b1709b453faa.js → peers.9bf322cedc753fa8456b.js} +1 -1
  16. package/artifacts/env-template/public/{preview-root.d61559bc7b06d0456acb.js → preview-root.6f380ef699dc27c5b1d6.js} +1 -1
  17. package/artifacts/env-template/public/static/css/{486.f6840c3e.css → 502.f6840c3e.css} +0 -0
  18. package/artifacts/preview/teambit_react_react-preview.js +1 -1
  19. package/{compositions-1659497571327.js → compositions-1659583874630.js} +0 -0
  20. package/dist/apps/web/compute-results.d.ts +2 -1
  21. package/dist/apps/web/compute-results.js +3 -1
  22. package/dist/apps/web/compute-results.js.map +1 -1
  23. package/dist/apps/web/react-app-options.d.ts +4 -0
  24. package/dist/apps/web/react-app-options.js.map +1 -1
  25. package/dist/apps/web/react-build-result.d.ts +1 -0
  26. package/dist/apps/web/react-build-result.js.map +1 -1
  27. package/dist/apps/web/react.app-type.js +1 -1
  28. package/dist/apps/web/react.app-type.js.map +1 -1
  29. package/dist/apps/web/react.application.d.ts +7 -3
  30. package/dist/apps/web/react.application.js +62 -95
  31. package/dist/apps/web/react.application.js.map +1 -1
  32. package/dist/apps/web/webpack/mutators.d.ts +3 -0
  33. package/dist/apps/web/webpack/mutators.js +90 -0
  34. package/dist/apps/web/webpack/mutators.js.map +1 -1
  35. package/dist/apps/web/webpack/webpack.app.ssr.config.d.ts +6 -0
  36. package/dist/apps/web/webpack/webpack.app.ssr.config.js +29 -0
  37. package/dist/apps/web/webpack/webpack.app.ssr.config.js.map +1 -1
  38. package/dist/webpack/webpack.config.base.js +15 -1
  39. package/dist/webpack/webpack.config.base.js.map +1 -1
  40. package/{overview-1659497571327.js → overview-1659583874630.js} +0 -0
  41. package/package-tar/teambit-react-0.0.807.tgz +0 -0
  42. package/package.json +32 -30
  43. package/{preview-1659497571327.js → preview-1659583874630.js} +2 -2
  44. package/webpack/webpack.config.base.ts +2 -1
  45. package/artifacts/env-template/public/overview.a0492e6adc2d378a78cf.js +0 -1
  46. package/package-tar/teambit-react-0.0.806.tgz +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["styleLoaderPath","require","resolve","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","isEnvProduction","isEnvProductionProfile","argv","includes","baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","postCssLoaderPath","postCssConfig","extensions","map","ext","alias","module","strictExportPresence","rules","test","fullySpecified","oneOf","stylesRegexps","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","exclude","options","babelrc","configFile","customize","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","contextRegExp","filter","Boolean","performance"],"sources":["webpack.config.base.ts"],"sourcesContent":["import { merge } from 'lodash';\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: 'inline-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.js'),\n 'react/jsx-runtime': require.resolve('react/jsx-runtime.js'),\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 customize: require.resolve('babel-preset-react-app/webpack-overrides'),\n presets: [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 // Process any JS outside of the app with Babel.\n // Unlike the application JS, we only compile the standard ES features.\n // Probably not needed in our use case\n // {\n // test: /\\.(js|mjs)$/,\n // exclude: /@babel(?:\\/|\\\\{1,2})runtime/,\n // loader: require.resolve('babel-loader'),\n // options: {\n // babelrc: false,\n // configFile: false,\n // compact: false,\n // presets: [[require.resolve('babel-preset-react-app/dependencies'), { helpers: true }]],\n // cacheDirectory: true,\n // // See #6846 for context on why cacheCompression is disabled\n // cacheCompression: false,\n\n // // Babel sourcemaps are needed for debugging into node_modules\n // // code. Without the options below, debuggers like VSCode\n // // show incorrect code and set breakpoints on the wrong lines.\n // sourceMaps: shouldUseSourceMap,\n // inputSourceMap: shouldUseSourceMap,\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-react'), require.resolve('@babel/preset-env')],\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: /^\\.\\/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;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;;AAEA;;;;;;;;;;AAEA,MAAMA,eAAe,GAAGC,OAAO,CAACC,OAAR,CAAgB,cAAhB,CAAxB;;AAEA,MAAMC,oBAAoB,GAAG,CAC3B,SAD2B,EAE3B,KAF2B,EAG3B,QAH2B,EAI3B,IAJ2B,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;QACA;QA1PK;MAJT,CAPK;IAFD,CAvBH;IAmSL;IACAU,OAAO,EAAE,CACP5D,eAAe,IACb,KAAIM,+BAAJ,EAAyB;MACvB;MACA;MACAiD,QAAQ,EAAE,uCAHa;MAIvBM,aAAa,EAAE;IAJQ,CAAzB,CAFK,EAQP;IACA;IACA;IACA;IACA;IACA,KAAIC,uBAAJ,EAAiB;MACfC,cAAc,EAAE,cADD;MAEfC,aAAa,EAAE;IAFA,CAAjB,CAbO,EAiBPC,MAjBO,CAiBAC,OAjBA,CApSJ;IAsTL;IACA;IACAC,WAAW,EAAE;EAxTR,CAAP;AA0TD"}
1
+ {"version":3,"names":["styleLoaderPath","require","resolve","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","isEnvProduction","isEnvProductionProfile","argv","includes","baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","postCssLoaderPath","postCssConfig","extensions","map","ext","alias","module","strictExportPresence","rules","test","fullySpecified","oneOf","stylesRegexps","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","exclude","options","babelrc","configFile","customize","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","filter","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: 'inline-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.js'),\n 'react/jsx-runtime': require.resolve('react/jsx-runtime.js'),\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 customize: require.resolve('babel-preset-react-app/webpack-overrides'),\n presets: [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 // Process any JS outside of the app with Babel.\n // Unlike the application JS, we only compile the standard ES features.\n // Probably not needed in our use case\n // {\n // test: /\\.(js|mjs)$/,\n // exclude: /@babel(?:\\/|\\\\{1,2})runtime/,\n // loader: require.resolve('babel-loader'),\n // options: {\n // babelrc: false,\n // configFile: false,\n // compact: false,\n // presets: [[require.resolve('babel-preset-react-app/dependencies'), { helpers: true }]],\n // cacheDirectory: true,\n // // See #6846 for context on why cacheCompression is disabled\n // cacheCompression: false,\n\n // // Babel sourcemaps are needed for debugging into node_modules\n // // code. Without the options below, debuggers like VSCode\n // // show incorrect code and set breakpoints on the wrong lines.\n // sourceMaps: shouldUseSourceMap,\n // inputSourceMap: shouldUseSourceMap,\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-react'), require.resolve('@babel/preset-env')],\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;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;;AAEA;;;;;;;;;;AAEA,MAAMA,eAAe,GAAGC,OAAO,CAACC,OAAR,CAAgB,cAAhB,CAAxB;;AAEA,MAAMC,oBAAoB,GAAG,CAC3B,SAD2B,EAE3B,KAF2B,EAG3B,QAH2B,EAI3B,IAJ2B,EAK3B,KAL2B,EAM3B,QAN2B,EAO3B,IAP2B,EAQ3B,SAR2B,EAS3B,KAT2B,EAU3B,MAV2B,EAW3B,SAX2B,EAY3B,KAZ2B,EAa3B,KAb2B,EAc3B,IAd2B,CAA7B,C,CAiBA;;AACA,MAAMC,kBAAkB,GAAGC,OAAO,CAACC,GAAR,CAAYC,kB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,uBAAJ,EAAiB;MACfC,cAAc,EAAE,IAAIC,MAAJ,CAAY,OAAMC,WAAI,SAAtB,CADD;MAEfC,aAAa,EAAE;IAFA,CAAjB,CAbO,EAiBPC,MAjBO,CAiBAC,OAjBA,CApSJ;IAsTL;IACA;IACAC,WAAW,EAAE;EAxTR,CAAP;AA0TD"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/react",
3
- "version": "0.0.806",
3
+ "version": "0.0.807",
4
4
  "homepage": "https://bit.dev/teambit/react/react",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.react",
8
8
  "name": "react",
9
- "version": "0.0.806"
9
+ "version": "0.0.807"
10
10
  },
11
11
  "dependencies": {
12
12
  "fs-extra": "10.0.0",
@@ -24,6 +24,7 @@
24
24
  "react-dev-utils": "11.0.4",
25
25
  "style-loader": "^2.0.0",
26
26
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
27
+ "lodash.compact": "3.0.1",
27
28
  "@babel/plugin-proposal-class-properties": "7.12.13",
28
29
  "@babel/plugin-proposal-decorators": "7.12.13",
29
30
  "@babel/plugin-proposal-object-rest-spread": "7.12.13",
@@ -83,37 +84,37 @@
83
84
  "@teambit/react.rendering.ssr": "0.0.3",
84
85
  "@teambit/compositions.ui.hooks.use-composition": "0.0.163",
85
86
  "@teambit/design.ui.tooltip": "0.0.352",
86
- "@teambit/builder": "0.0.806",
87
- "@teambit/bundler": "0.0.806",
88
- "@teambit/compiler": "0.0.806",
87
+ "@teambit/builder": "0.0.807",
88
+ "@teambit/bundler": "0.0.807",
89
+ "@teambit/compiler": "0.0.807",
89
90
  "@teambit/component.modules.component-url": "0.0.128",
90
- "@teambit/component": "0.0.806",
91
- "@teambit/dependency-resolver": "0.0.806",
92
- "@teambit/envs": "0.0.806",
93
- "@teambit/eslint": "0.0.806",
94
- "@teambit/formatter": "0.0.357",
95
- "@teambit/jest": "0.0.806",
96
- "@teambit/linter": "0.0.806",
97
- "@teambit/logger": "0.0.630",
98
- "@teambit/pkg": "0.0.806",
99
- "@teambit/prettier": "0.0.357",
91
+ "@teambit/component": "0.0.807",
92
+ "@teambit/dependency-resolver": "0.0.807",
93
+ "@teambit/envs": "0.0.807",
94
+ "@teambit/eslint": "0.0.807",
95
+ "@teambit/formatter": "0.0.358",
96
+ "@teambit/jest": "0.0.807",
97
+ "@teambit/linter": "0.0.807",
98
+ "@teambit/logger": "0.0.631",
99
+ "@teambit/pkg": "0.0.807",
100
+ "@teambit/prettier": "0.0.358",
100
101
  "@teambit/react.ui.compositions-app": "0.0.1",
101
102
  "@teambit/react.ui.docs-app": "0.0.182",
102
103
  "@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.21",
103
- "@teambit/schema": "0.0.806",
104
- "@teambit/tester": "0.0.806",
105
- "@teambit/typescript": "0.0.806",
106
- "@teambit/webpack": "0.0.806",
107
- "@teambit/workspace": "0.0.806",
108
- "@teambit/application": "0.0.448",
109
- "@teambit/cli": "0.0.537",
110
- "@teambit/generator": "0.0.806",
111
- "@teambit/graphql": "0.0.806",
112
- "@teambit/preview": "0.0.806",
104
+ "@teambit/schema": "0.0.807",
105
+ "@teambit/tester": "0.0.807",
106
+ "@teambit/typescript": "0.0.807",
107
+ "@teambit/webpack": "0.0.807",
108
+ "@teambit/workspace": "0.0.807",
109
+ "@teambit/application": "0.0.449",
110
+ "@teambit/cli": "0.0.538",
111
+ "@teambit/generator": "0.0.807",
112
+ "@teambit/graphql": "0.0.807",
113
+ "@teambit/preview": "0.0.807",
113
114
  "@teambit/react.ui.highlighter-provider": "0.0.190",
114
- "@teambit/compositions": "0.0.806",
115
- "@teambit/ui": "0.0.806",
116
- "@teambit/react.eslint-config-bit-react": "0.0.611",
115
+ "@teambit/compositions": "0.0.807",
116
+ "@teambit/ui": "0.0.807",
117
+ "@teambit/react.eslint-config-bit-react": "0.0.612",
117
118
  "@teambit/mdx.modules.mdx-loader": "0.0.492",
118
119
  "@teambit/react.babel.bit-react-transformer": "0.0.504",
119
120
  "@teambit/webpack.modules.generate-style-loaders": "0.0.103",
@@ -123,7 +124,7 @@
123
124
  "@teambit/toolbox.network.get-port": "0.0.113",
124
125
  "@teambit/react.modules.prerenderer-puppeteer": "0.0.2",
125
126
  "@teambit/ui-foundation.ui.pages.static-error": "0.0.74",
126
- "@teambit/config": "0.0.550"
127
+ "@teambit/config": "0.0.551"
127
128
  },
128
129
  "devDependencies": {
129
130
  "@types/react": "^17.0.8",
@@ -133,6 +134,7 @@
133
134
  "@types/webpack": "5.28.0",
134
135
  "@types/mini-css-extract-plugin": "2.2.0",
135
136
  "@types/react-dev-utils": "9.0.10",
137
+ "@types/lodash.compact": "3.0.6",
136
138
  "@types/express": "4.17.13",
137
139
  "@types/url-join": "4.0.0",
138
140
  "@types/react-dom": "^17.0.5",
@@ -144,7 +146,7 @@
144
146
  "@teambit/react.content.react-overview": "1.95.0"
145
147
  },
146
148
  "peerDependencies": {
147
- "@teambit/legacy": "1.0.320",
149
+ "@teambit/legacy": "1.0.321",
148
150
  "react-dom": "^16.8.0 || ^17.0.0",
149
151
  "react": "^16.8.0 || ^17.0.0"
150
152
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.806/dist/react.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.806/dist/react.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.807/dist/react.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.807/dist/react.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -1,4 +1,5 @@
1
1
  import { merge } from 'lodash';
2
+ import { sep } from 'path';
2
3
  import 'style-loader';
3
4
  import MiniCssExtractPlugin from 'mini-css-extract-plugin';
4
5
  import getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';
@@ -363,7 +364,7 @@ export default function (isEnvProduction = false): Configuration {
363
364
  // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
364
365
  // You can remove this if you don't use Moment.js:
365
366
  new IgnorePlugin({
366
- resourceRegExp: /^\.\/locale$/,
367
+ resourceRegExp: new RegExp(`^\\.${sep}locale$`),
367
368
  contextRegExp: /moment$/,
368
369
  }),
369
370
  ].filter(Boolean),
@@ -1 +0,0 @@
1
- "use strict";(self.__loadChunks_EnvTemplate=self.__loadChunks_EnvTemplate||[]).push([[340],{5639:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(79022),_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("overview",{mainModule:_home_circleci_bit_bit_node_modules_teambit_react_ui_docs_app_dist_index_js__WEBPACK_IMPORTED_MODULE_1__,isSplitComponentBundle:!0,componentMap:{}})}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[22,244,486,629,384],()=>__webpack_exec__(5639));var __webpack_exports__=__webpack_require__.O()}]);