@teambit/react 0.0.787 → 0.0.788
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/web/react-app-options.ts +1 -1
- package/apps/web/react.application.ts +1 -1
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/env-template/public/{22.2ca76823cc3c7a67fd3d.js → 22.40a4f61fa7f5e12a2412.js} +3 -3
- package/artifacts/env-template/public/{408.fa414fa826680282be58.js → 685.9e6e4d67c15f57981794.js} +74 -34
- package/artifacts/env-template/public/assets-manifest.json +14 -14
- package/artifacts/env-template/public/{compositions.0d931551272dd8d24444.js → compositions.076c2eda18e0c7bfd05a.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.ccd3a0ca2b9708ce99fb.js → overview.1294fbfaa2e1e3453861.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.c45c42ca4faae5a3bc01.js → peers.020a4ed10e668847cb99.js} +1 -1
- package/artifacts/env-template/public/{preview-root.e5a0940ef4224fc2424e.js → preview-root.e23d7131e9a8b2c58862.js} +1 -1
- package/artifacts/env-template/public/static/css/{408.9138636c.css → 685.c26f5609.css} +1 -1
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1657623030826.js → compositions-1657709114119.js} +0 -0
- package/dist/apps/web/react-app-options.js.map +1 -1
- package/dist/apps/web/react.application.js.map +1 -1
- package/{overview-1657623030826.js → overview-1657709114119.js} +0 -0
- package/package-tar/teambit-react-0.0.788.tgz +0 -0
- package/package.json +30 -30
- package/{preview-1657623030826.js → preview-1657709114119.js} +2 -2
- package/package-tar/teambit-react-0.0.787.tgz +0 -0
|
@@ -8,4 +8,4 @@ It enables you to quickly set up a dev environment that follows best practices f
|
|
|
8
8
|
}
|
|
9
9
|
`)),(0,_react2.mdx)("h2",null,"Creating Components"),(0,_react2.mdx)("p",null,"React env provides a set of component templates that can be used to speed-up and standardize your component development:"),(0,_react2.mdx)("p",null,"To list all available templates:"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-bash"},`bit templates
|
|
10
10
|
`)),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react")," a basic React UI component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-context")," a react context component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-hook")," a react hook component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"mdx-component")," an MDX component."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-component-js")," a basic React component in JS."),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("inlineCode",{parentName:"li"},"react-env")," boilerplate for a customized environment configuration.")),(0,_react2.mdx)("p",null,"Use any of these templates with the ",(0,_react2.mdx)("inlineCode",{parentName:"p"},"bit create")," command:"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-bash"},`bit create react ui/my-welcome
|
|
11
|
-
`)),(0,_react2.mdx)("h2",null,"Development services and configurations"),(0,_react2.mdx)("p",null,"The table below lists ",(0,_react2.mdx)("a",{parentName:"p",href:"/dev-services/dev-services-overview"},"dev services")," that are provided by the React env. Each service handles a specific component development operation. Each is implemented by the React env, using a specific set of configurations."),(0,_react2.mdx)("p",null,"To customize and extend the React env, ",(0,_react2.mdx)("a",{parentName:"p",href:"/envs/pre-configured-envs/react/extending-react#using-your-own-react-env-extension"},"create you own React env extension"),". You can replace the Aspects used by the env, or override their configurations (use the links provided in the 'customization' column)."),(0,_react2.mdx)("table",null,(0,_react2.mdx)("thead",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"thead"},(0,_react2.mdx)("th",{parentName:"tr",align:null},"Service"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Aspect"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Default config"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Customization"))),(0,_react2.mdx)("tbody",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/compiler-overview"},"Compiler")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript"},"TypeScript")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/typescript/tsconfig.json"},"tsconfig.json")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#typescript"},"TS compilation config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/configure-env-with-compiler"},"Replace compiler"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/tester/overview"},"Tester")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/jest"},"Jest")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/jest/jest.config.js"},"jest.config.js")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#jest"},"Jest config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/tester/configure-env-with-tester"},"Replace Tester"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/linter/overview"},"Linting")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/eslint"},"ESLint")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/eslint/eslintrc.ts"},"eslintrc.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#eslint"},"ESLint Config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/linter/configure-env-with-linter"},"Replace Linter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/formatter/overview"},"Formatter")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/prettier"},"Prettier")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/prettier/prettier.config.js"},"prettier.config.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#prettier"},"Prettier config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/formatter/configure-env-with-formatter"},"Replace Formatter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"DevServer"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.dev.ts"},"webpack.config.preview.dev.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling in the workspace)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/preview/overview"},"Preview")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null}),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/preview/register-custom-preview"},"Add preview"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/packages/packages-overview"},"Package")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"See the ",(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript/~code/typescript.main.runtime.ts"},"TypeScript Aspect")," config"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/packages/managing-package-json#set-configuration-from-an-env"},"Add Env package config")," ",(0,_react2.mdx)("br",null)," \u2022 TypeScript's package config")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"Bundler"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.ts"},"webpack.config.preview.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling during build)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-overview"},"Documentation")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/docs/index.tsx"},"Docs template")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-templates"},"Replace docs template"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Builder")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Build pipeline")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/builder/build-pipelines"},"Build pipelines"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/dependencies-overview"},"Dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/react.env.ts"},"Env-dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/configuring-dependencies#configuring-dependencies-from-an-env"},"Env dependencies"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/generator/generator-overview"},"Generator")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/templates/react-component.ts"},"React templates")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:""},"Add a component template"))))),(0,_react2.mdx)("h3",null,"Default React versions"),(0,_react2.mdx)("p",null,"By default, the React env sets the following dependency versions for components using it:"),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react-dom")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.8")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react-dom"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.5")))))}MDXContent.__bit_component=__bit_component,MDXContent.isMDXComponent=!0},88432:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.787",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(88244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(63804));return _react=function(){return data},data}_react.__bit_component=__bit_component;const Logo=()=>_react().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},_react().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/react.svg"}));Logo.__bit_component=__bit_component,exports2.Logo=Logo},85057:module2=>{"use strict";module2.exports=MdxJsReact},63804:module2=>{"use strict";module2.exports=React},58459:module2=>{"use strict";module2.exports=TeambitMdxUiMdxScopeContext}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module2=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module2,module2.exports,__webpack_require__),module2.exports}__webpack_require__.d=(exports2,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports2,key)&&Object.defineProperty(exports2,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports2,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{compositions:()=>compositions,overview:()=>overview});var react_docs_namespaceObject={};__webpack_require__.r(react_docs_namespaceObject),__webpack_require__.d(react_docs_namespaceObject,{default:()=>MDXContent});var react_composition=__webpack_require__(88432),external_React_=__webpack_require__(63804),external_MdxJsReact_=__webpack_require__(85057),external_TeambitMdxUiMdxScopeContext_=__webpack_require__(58459),dist=__webpack_require__(55906),_excluded=["components"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,external_MdxJsReact_.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,external_MdxJsReact_.mdx)(external_TeambitMdxUiMdxScopeContext_.MDXScopeProvider,{components:{ReactOverview:dist.ZP},mdxType:"MDXScopeProvider"},(0,external_MdxJsReact_.mdx)(dist.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0;const compositions=[react_composition],overview=[react_docs_namespaceObject]})(),__webpack_exports__})()});
|
|
11
|
+
`)),(0,_react2.mdx)("h2",null,"Development services and configurations"),(0,_react2.mdx)("p",null,"The table below lists ",(0,_react2.mdx)("a",{parentName:"p",href:"/dev-services/dev-services-overview"},"dev services")," that are provided by the React env. Each service handles a specific component development operation. Each is implemented by the React env, using a specific set of configurations."),(0,_react2.mdx)("p",null,"To customize and extend the React env, ",(0,_react2.mdx)("a",{parentName:"p",href:"/envs/pre-configured-envs/react/extending-react#using-your-own-react-env-extension"},"create you own React env extension"),". You can replace the Aspects used by the env, or override their configurations (use the links provided in the 'customization' column)."),(0,_react2.mdx)("table",null,(0,_react2.mdx)("thead",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"thead"},(0,_react2.mdx)("th",{parentName:"tr",align:null},"Service"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Aspect"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Default config"),(0,_react2.mdx)("th",{parentName:"tr",align:null},"Customization"))),(0,_react2.mdx)("tbody",{parentName:"table"},(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/compiler-overview"},"Compiler")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript"},"TypeScript")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/typescript/tsconfig.json"},"tsconfig.json")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#typescript"},"TS compilation config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/compiler/configure-env-with-compiler"},"Replace compiler"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/tester/overview"},"Tester")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/jest"},"Jest")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/jest/jest.config.js"},"jest.config.js")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#jest"},"Jest config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/tester/configure-env-with-tester"},"Replace Tester"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/linter/overview"},"Linting")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/eslint"},"ESLint")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/eslint/eslintrc.ts"},"eslintrc.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#eslint"},"ESLint Config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/linter/configure-env-with-linter"},"Replace Linter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/formatter/overview"},"Formatter")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/defender/prettier"},"Prettier")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/prettier/prettier.config.js"},"prettier.config.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/frameworks/react/config-react-tools#prettier"},"Prettier config")," ",(0,_react2.mdx)("br",null)," \u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/formatter/configure-env-with-formatter"},"Replace Formatter"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"DevServer"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.dev.ts"},"webpack.config.preview.dev.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling in the workspace)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/preview/overview"},"Preview")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null}),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/preview/register-custom-preview"},"Add preview"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/packages/packages-overview"},"Package")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"See the ",(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/typescript/typescript/~code/typescript.main.runtime.ts"},"TypeScript Aspect")," config"),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 ",(0,_react2.mdx)("a",{parentName:"td",href:"/packages/managing-package-json#set-configuration-from-an-env"},"Add Env package config")," ",(0,_react2.mdx)("br",null)," \u2022 TypeScript's package config")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},"Bundler"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/webpack/webpack"},"Webpack")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/webpack/webpack.config.preview.ts"},"webpack.config.preview.ts")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"\u2022 Webpack config (for bundling during build)")),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-overview"},"Documentation")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/docs/index.tsx"},"Docs template")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/docs/docs-templates"},"Replace docs template"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Builder")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"http://localhost:3000/docs/dev-services/builder/builder-overview"},"Build pipeline")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dev-services/builder/build-pipelines"},"Build pipelines"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/dependencies-overview"},"Dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/react.env.ts"},"Env-dependencies")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/dependencies/configuring-dependencies#configuring-dependencies-from-an-env"},"Env dependencies"))),(0,_react2.mdx)("tr",{parentName:"tbody"},(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"/docs/dev-services/generator/generator-overview"},"Generator")),(0,_react2.mdx)("td",{parentName:"tr",align:null},"-"),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:"https://bit.dev/teambit/react/react/~code/templates/react-component.ts"},"React templates")),(0,_react2.mdx)("td",{parentName:"tr",align:null},(0,_react2.mdx)("a",{parentName:"td",href:""},"Add a component template"))))),(0,_react2.mdx)("h3",null,"Default React versions"),(0,_react2.mdx)("p",null,"By default, the React env sets the following dependency versions for components using it:"),(0,_react2.mdx)("ul",null,(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"react-dom")," (peer dependency): ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^16.8.0 || ^17.0.0")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.8")),(0,_react2.mdx)("li",{parentName:"ul"},(0,_react2.mdx)("strong",{parentName:"li"},"@types/react-dom"),": ",(0,_react2.mdx)("inlineCode",{parentName:"li"},"^17.0.5")))))}MDXContent.__bit_component=__bit_component,MDXContent.isMDXComponent=!0},49833:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.788",homepage:"https://bit.dev/teambit/react/react",exported:!0},_interopRequireDefault=__webpack_require__2(88244);Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.Logo=void 0;function _react(){const data=_interopRequireDefault(__webpack_require__2(63804));return _react=function(){return data},data}_react.__bit_component=__bit_component;const Logo=()=>_react().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},_react().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/react.svg"}));Logo.__bit_component=__bit_component,exports2.Logo=Logo},85057:module2=>{"use strict";module2.exports=MdxJsReact},63804:module2=>{"use strict";module2.exports=React},58459:module2=>{"use strict";module2.exports=TeambitMdxUiMdxScopeContext}},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module2=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module2,module2.exports,__webpack_require__),module2.exports}__webpack_require__.d=(exports2,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports2,key)&&Object.defineProperty(exports2,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports2=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports2,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{compositions:()=>compositions,overview:()=>overview});var react_docs_namespaceObject={};__webpack_require__.r(react_docs_namespaceObject),__webpack_require__.d(react_docs_namespaceObject,{default:()=>MDXContent});var react_composition=__webpack_require__(49833),external_React_=__webpack_require__(63804),external_MdxJsReact_=__webpack_require__(85057),external_TeambitMdxUiMdxScopeContext_=__webpack_require__(58459),dist=__webpack_require__(55906),_excluded=["components"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded),key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],!(excluded.indexOf(key)>=0)&&(!Object.prototype.propertyIsEnumerable.call(source,key)||(target[key]=source[key]))}return target}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,external_MdxJsReact_.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,external_MdxJsReact_.mdx)(external_TeambitMdxUiMdxScopeContext_.MDXScopeProvider,{components:{ReactOverview:dist.ZP},mdxType:"MDXScopeProvider"},(0,external_MdxJsReact_.mdx)(dist.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0;const compositions=[react_composition],overview=[react_docs_namespaceObject]})(),__webpack_exports__})()});
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["react-app-options.ts"],"sourcesContent":["import { Bundler, DevServer } from '@teambit/bundler';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\n\nimport { ReactDeployContext } from './deploy-context';\n\ntype prerenderedRoute = {\n /** The prerendered route, after following redirects */\n route: string;\n /** The original route passed, before redirects */\n originalRoute: string;\n /** The resulting HTML for the route */\n html: string;\n /**\n * The path to write the rendered HTML to.\n * This is null (automatically calculated after postProcess)\n * unless explicitly set. */\n outputPath?: string | null;\n};\n\n/** https://github.com/Tofandel/prerender-spa-plugin-next */\nexport type ReactAppPrerenderOptions = {\n /**\n * sub folder to output the prerender, inside the webpack output folder\n * @default '/'\n */\n staticDir?: string;\n\n /** The index file to fall back on for SPAs. */\n indexPath?: string;\n\n /**\n * routes to prerender\n */\n routes: string[];\n\n /**\n * the proxy server you want the prerender headless browser to run on\n */\n server?: {\n proxy: {\n [key: string]: {\n /** required by HPM.\n * @default 'http://localhost:8000/' */\n target: string;\n pathRewrite: { [key: string]: string };\n };\n };\n };\n\n /**\n * Post processing of the prerendered html. This is useful for adding meta tags to the html or changing the file name.\n */\n postProcess?: (prerenderRoute: prerenderedRoute) => prerenderedRoute;\n\n /** The renderer you'd like to use to prerender the app.\n * @default new require(\"@prerenderer/renderer-puppeteer\").\n */\n renderer?: any;\n\n /** options to pass to the renderer class's constructor */\n rendererOptions?: any;\n};\n\nexport type ReactAppOptions = {\n /**\n * name of the application.\n */\n name: string;\n\n /**\n * path to entry files of the application.\n */\n entry: string[]|(() => Promise<string[]>);\n\n /**\n * use server-side rendering for the app.\n */\n ssr?: boolean;\n\n /**\n * instance of bundler to use. default is Webpack.\n */\n bundler?: Bundler;\n\n /**\n * instance of dev server to use. default is Webpack.\n */\n devServer?: DevServer;\n\n /**\n * set webpack transformers\n */\n webpackTransformers?: WebpackConfigTransformer[];\n\n /**\n * decide whether to prerender your app. accepts an array of routes. if none, prerender would not apply.\n * e.g ['/plugins', '/learn', '/docs/quick-start]\n * You can also pass a configuration for the proxy, please refer here: https://github.com/webpack/docs/wiki/webpack-dev-server#proxy\n *\n */\n prerender?: ReactAppPrerenderOptions;\n\n /**\n * deploy function.\n */\n deploy?: (context: ReactDeployContext) => Promise<void>;\n\n /**\n * ranges of ports to use to run the app server.\n */\n portRange?: number[];\n\n /**\n * favicon for the app. You can pass an abs path (using require.resolve()) or a url.\n */\n favicon?: string;\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["react-app-options.ts"],"sourcesContent":["import { Bundler, DevServer } from '@teambit/bundler';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\n\nimport { ReactDeployContext } from './deploy-context';\n\ntype prerenderedRoute = {\n /** The prerendered route, after following redirects */\n route: string;\n /** The original route passed, before redirects */\n originalRoute: string;\n /** The resulting HTML for the route */\n html: string;\n /**\n * The path to write the rendered HTML to.\n * This is null (automatically calculated after postProcess)\n * unless explicitly set. */\n outputPath?: string | null;\n};\n\n/** https://github.com/Tofandel/prerender-spa-plugin-next */\nexport type ReactAppPrerenderOptions = {\n /**\n * sub folder to output the prerender, inside the webpack output folder\n * @default '/'\n */\n staticDir?: string;\n\n /** The index file to fall back on for SPAs. */\n indexPath?: string;\n\n /**\n * routes to prerender\n */\n routes: string[];\n\n /**\n * the proxy server you want the prerender headless browser to run on\n */\n server?: {\n proxy: {\n [key: string]: {\n /** required by HPM.\n * @default 'http://localhost:8000/' */\n target: string;\n pathRewrite: { [key: string]: string };\n };\n };\n };\n\n /**\n * Post processing of the prerendered html. This is useful for adding meta tags to the html or changing the file name.\n */\n postProcess?: (prerenderRoute: prerenderedRoute) => prerenderedRoute;\n\n /** The renderer you'd like to use to prerender the app.\n * @default new require(\"@prerenderer/renderer-puppeteer\").\n */\n renderer?: any;\n\n /** options to pass to the renderer class's constructor */\n rendererOptions?: any;\n};\n\nexport type ReactAppOptions = {\n /**\n * name of the application.\n */\n name: string;\n\n /**\n * path to entry files of the application.\n */\n entry: string[] | (() => Promise<string[]>);\n\n /**\n * use server-side rendering for the app.\n */\n ssr?: boolean;\n\n /**\n * instance of bundler to use. default is Webpack.\n */\n bundler?: Bundler;\n\n /**\n * instance of dev server to use. default is Webpack.\n */\n devServer?: DevServer;\n\n /**\n * set webpack transformers\n */\n webpackTransformers?: WebpackConfigTransformer[];\n\n /**\n * decide whether to prerender your app. accepts an array of routes. if none, prerender would not apply.\n * e.g ['/plugins', '/learn', '/docs/quick-start]\n * You can also pass a configuration for the proxy, please refer here: https://github.com/webpack/docs/wiki/webpack-dev-server#proxy\n *\n */\n prerender?: ReactAppPrerenderOptions;\n\n /**\n * deploy function.\n */\n deploy?: (context: ReactDeployContext) => Promise<void>;\n\n /**\n * ranges of ports to use to run the app server.\n */\n portRange?: number[];\n\n /**\n * favicon for the app. You can pass an abs path (using require.resolve()) or a url.\n */\n favicon?: string;\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ReactApp","constructor","name","entry","portRange","reactEnv","prerender","bundler","devServer","transformers","deploy","favicon","isPrerendering","TerserPlugin","extractComments","terserOptions","parse","ecma","compress","warnings","comparisons","inline","mangle","safari10","output","comments","ascii_only","minify","esbuildMinify","run","context","from","to","port","Port","getPort","listen","devServerContext","getDevServerContext","getDevServer","configMutator","addTopLevel","historyApiFallback","index","disableDotRule","headers","raw","publicPath","build","htmlConfig","title","templateContent","html","Object","assign","getBundler","bundleResult","computeResults","publicDir","getPublicDir","artifactsDir","dir","getDefaultBundler","capsule","env","outputPath","join","path","distDir","getCompiler","targetEntries","Array","isArray","entries","map","require","resolve","basename","staticDir","bundlerContext","targets","components","component","hostDependencies","getPeers","aliasHostDependencies","rootPath","metaData","initiator","envId","id","defaultTransformer","config","addPlugin","prerenderPlugin","optimization","minimizer","remove","push","getESBuildConfig","applicationType","getEntries","getPeerDependenciesList"],"sources":["react.application.ts"],"sourcesContent":["import { join, basename } from 'path';\nimport { Application, AppContext, AppBuildContext } from '@teambit/application';\nimport { Bundler, DevServer, BundlerContext, DevServerContext, BundlerHtmlConfig } from '@teambit/bundler';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { remove } from 'lodash';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\nimport { ReactEnv } from '../../react.env';\nimport { prerenderPlugin } from './plugins';\nimport { ReactAppBuildResult } from './react-build-result';\nimport { ReactAppPrerenderOptions } from './react-app-options';\nimport { html } from '../../webpack';\nimport { ReactDeployContext } from '.';\nimport { computeResults } from './compute-results';\n\nexport class ReactApp implements Application {\n constructor(\n readonly name: string,\n readonly entry: string[]|(() => Promise<string[]>),\n readonly portRange: number[],\n private reactEnv: ReactEnv,\n readonly prerender?: ReactAppPrerenderOptions,\n readonly bundler?: Bundler,\n readonly devServer?: DevServer,\n readonly transformers: WebpackConfigTransformer[] = [],\n readonly deploy?: (context: ReactDeployContext) => Promise<void>,\n readonly favicon?: string\n ) {}\n readonly applicationType = 'react-common-js';\n readonly dir = 'public';\n\n async run(context: AppContext): Promise<number> {\n const [from, to] = this.portRange;\n const port = await Port.getPort(from, to);\n if (this.devServer) {\n await this.devServer.listen(port);\n return port;\n }\n const devServerContext = await this.getDevServerContext(context);\n const devServer = this.reactEnv.getDevServer(devServerContext, [\n (configMutator) =>\n configMutator.addTopLevel('devServer', {\n historyApiFallback: {\n index: '/index.html',\n disableDotRule: true,\n headers: {\n 'Access-Control-Allow-Headers': '*',\n },\n },\n }),\n (configMutator) => {\n if (!configMutator.raw.output) configMutator.raw.output = {};\n configMutator.raw.output.publicPath = '/';\n\n return configMutator;\n },\n ...this.transformers,\n ]);\n await devServer.listen(port);\n return port;\n }\n\n async build(context: AppBuildContext): Promise<ReactAppBuildResult> {\n const htmlConfig: BundlerHtmlConfig[] = [\n {\n title: context.name,\n templateContent: html(context.name),\n minify: false,\n favicon: this.favicon,\n // filename: ''.html`,\n },\n ];\n Object.assign(context, {\n html: htmlConfig,\n });\n const bundler = await this.getBundler(context);\n const bundleResult = await bundler.run();\n\n return computeResults(bundleResult, { publicDir: `${this.getPublicDir(context.artifactsDir)}/${this.dir}` });\n }\n\n private getBundler(context: AppBuildContext) {\n if (this.bundler) return this.bundler;\n return this.getDefaultBundler(context);\n }\n private async getDefaultBundler(context: AppBuildContext) {\n const { capsule } = context;\n const reactEnv: ReactEnv = context.env;\n const publicDir = this.getPublicDir(context.artifactsDir);\n const outputPath = join(capsule.path, publicDir);\n const { distDir } = reactEnv.getCompiler();\n const targetEntries = Array.isArray(this.entry) ? this.entry : await this.entry();\n const entries = targetEntries.map((entry) => require.resolve(`${capsule.path}/${distDir}/${basename(entry)}`));\n const staticDir = join(outputPath, this.dir);\n\n const bundlerContext: BundlerContext = Object.assign(context, {\n targets: [\n {\n components: [capsule?.component],\n entries,\n outputPath,\n hostDependencies: await this.getPeers(),\n aliasHostDependencies: true,\n },\n ],\n entry: [],\n rootPath: '/',\n metaData: {\n initiator: `building app: ${context.name}`,\n envId: context.id,\n },\n });\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const config = configMutator.addTopLevel('output', { path: staticDir, publicPath: `/` });\n if (this.prerender) config.addPlugin(prerenderPlugin(this.prerender));\n if (config.raw.optimization?.minimizer) {\n remove(config.raw.optimization?.minimizer, (minimizer) => {\n return minimizer.constructor.name === 'TerserPlugin';\n });\n\n config.raw.optimization?.minimizer.push(this.getESBuildConfig());\n }\n\n return config;\n };\n const transformers = [defaultTransformer, ...this.transformers];\n const bundler: Bundler = await reactEnv.getBundler(bundlerContext, transformers);\n return bundler;\n }\n private getESBuildConfig = (isPrerendering = this.prerender) => {\n // We don't want to use esbuild in case of prerendering since the headless browser puppeteer doesn't support\n // the output of esbuild\n\n if (isPrerendering) {\n return 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 }\n return 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 terserOptions: {\n minify: true,\n },\n });\n };\n\n private getPublicDir(artifactsDir: string) {\n return join(artifactsDir, this.applicationType, this.name);\n }\n\n async getEntries(): Promise<string[]> {\n if (Array.isArray(this.entry)) return this.entry;\n return this.entry();\n }\n\n private async getDevServerContext(context: AppContext): Promise<DevServerContext> {\n const entries = await this.getEntries();\n return Object.assign(context, {\n entry: entries,\n rootPath: '',\n publicPath: `public/${this.name}`,\n title: this.name,\n favicon: this.favicon,\n hostDependencies: await this.getPeers(),\n aliasHostDependencies: true,\n });\n }\n\n private getPeers(): Promise<string[]> {\n return this.reactEnv.getPeerDependenciesList();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,QAAN,CAAsC;EAC3CC,WAAW,CACAC,IADA,EAEAC,KAFA,EAGAC,SAHA,EAIDC,QAJC,EAKAC,SALA,EAMAC,OANA,EAOAC,SAPA,EAQAC,YAAwC,GAAG,EAR3C,EASAC,MATA,EAUAC,OAVA,EAWT;IAAA,KAVST,IAUT,GAVSA,IAUT;IAAA,KATSC,KAST,GATSA,KAST;IAAA,KARSC,SAQT,GARSA,SAQT;IAAA,KAPQC,QAOR,GAPQA,QAOR;IAAA,KANSC,SAMT,GANSA,SAMT;IAAA,KALSC,OAKT,GALSA,OAKT;IAAA,KAJSC,SAIT,GAJSA,SAIT;IAAA,KAHSC,YAGT,GAHSA,YAGT;IAAA,KAFSC,MAET,GAFSA,MAET;IAAA,KADSC,OACT,GADSA,OACT;IAAA,yDACyB,iBADzB;IAAA,6CAEa,QAFb;IAAA,0DAuGyB,CAACC,cAAc,GAAG,KAAKN,SAAvB,KAAqC;MAC9D;MACA;MAEA,IAAIM,cAAJ,EAAoB;QAClB,OAAO,KAAIC,8BAAJ,EAAiB;UACtBC,eAAe,EAAE,KADK;UAEtBC,aAAa,EAAE;YACbC,KAAK,EAAE;cACL;cACA;cACA;cACA;cACA;cACAC,IAAI,EAAE;YAND,CADM;YASbC,QAAQ,EAAE;cACRD,IA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,QAAQ,EAAE,EAFkB;MAG5BvC,UAAU,EAAG,UAAS,KAAK7C,IAAK,EAHJ;MAI5BgD,KAAK,EAAE,KAAKhD,IAJgB;MAK5BS,OAAO,EAAE,KAAKA,OALc;MAM5BwE,gBAAgB,EAAE,MAAM,KAAKC,QAAL,EANI;MAO5BC,qBAAqB,EAAE;IAPK,CAAvB,CAAP;EASD;;EAEOD,QAAQ,GAAsB;IACpC,OAAO,KAAK/E,QAAL,CAAciG,uBAAd,EAAP;EACD;;AAhM0C"}
|
|
1
|
+
{"version":3,"names":["ReactApp","constructor","name","entry","portRange","reactEnv","prerender","bundler","devServer","transformers","deploy","favicon","isPrerendering","TerserPlugin","extractComments","terserOptions","parse","ecma","compress","warnings","comparisons","inline","mangle","safari10","output","comments","ascii_only","minify","esbuildMinify","run","context","from","to","port","Port","getPort","listen","devServerContext","getDevServerContext","getDevServer","configMutator","addTopLevel","historyApiFallback","index","disableDotRule","headers","raw","publicPath","build","htmlConfig","title","templateContent","html","Object","assign","getBundler","bundleResult","computeResults","publicDir","getPublicDir","artifactsDir","dir","getDefaultBundler","capsule","env","outputPath","join","path","distDir","getCompiler","targetEntries","Array","isArray","entries","map","require","resolve","basename","staticDir","bundlerContext","targets","components","component","hostDependencies","getPeers","aliasHostDependencies","rootPath","metaData","initiator","envId","id","defaultTransformer","config","addPlugin","prerenderPlugin","optimization","minimizer","remove","push","getESBuildConfig","applicationType","getEntries","getPeerDependenciesList"],"sources":["react.application.ts"],"sourcesContent":["import { join, basename } from 'path';\nimport { Application, AppContext, AppBuildContext } from '@teambit/application';\nimport { Bundler, DevServer, BundlerContext, DevServerContext, BundlerHtmlConfig } from '@teambit/bundler';\nimport { Port } from '@teambit/toolbox.network.get-port';\nimport { remove } from 'lodash';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport { WebpackConfigTransformer } from '@teambit/webpack';\nimport { ReactEnv } from '../../react.env';\nimport { prerenderPlugin } from './plugins';\nimport { ReactAppBuildResult } from './react-build-result';\nimport { ReactAppPrerenderOptions } from './react-app-options';\nimport { html } from '../../webpack';\nimport { ReactDeployContext } from '.';\nimport { computeResults } from './compute-results';\n\nexport class ReactApp implements Application {\n constructor(\n readonly name: string,\n readonly entry: string[] | (() => Promise<string[]>),\n readonly portRange: number[],\n private reactEnv: ReactEnv,\n readonly prerender?: ReactAppPrerenderOptions,\n readonly bundler?: Bundler,\n readonly devServer?: DevServer,\n readonly transformers: WebpackConfigTransformer[] = [],\n readonly deploy?: (context: ReactDeployContext) => Promise<void>,\n readonly favicon?: string\n ) {}\n readonly applicationType = 'react-common-js';\n readonly dir = 'public';\n\n async run(context: AppContext): Promise<number> {\n const [from, to] = this.portRange;\n const port = await Port.getPort(from, to);\n if (this.devServer) {\n await this.devServer.listen(port);\n return port;\n }\n const devServerContext = await this.getDevServerContext(context);\n const devServer = this.reactEnv.getDevServer(devServerContext, [\n (configMutator) =>\n configMutator.addTopLevel('devServer', {\n historyApiFallback: {\n index: '/index.html',\n disableDotRule: true,\n headers: {\n 'Access-Control-Allow-Headers': '*',\n },\n },\n }),\n (configMutator) => {\n if (!configMutator.raw.output) configMutator.raw.output = {};\n configMutator.raw.output.publicPath = '/';\n\n return configMutator;\n },\n ...this.transformers,\n ]);\n await devServer.listen(port);\n return port;\n }\n\n async build(context: AppBuildContext): Promise<ReactAppBuildResult> {\n const htmlConfig: BundlerHtmlConfig[] = [\n {\n title: context.name,\n templateContent: html(context.name),\n minify: false,\n favicon: this.favicon,\n // filename: ''.html`,\n },\n ];\n Object.assign(context, {\n html: htmlConfig,\n });\n const bundler = await this.getBundler(context);\n const bundleResult = await bundler.run();\n\n return computeResults(bundleResult, { publicDir: `${this.getPublicDir(context.artifactsDir)}/${this.dir}` });\n }\n\n private getBundler(context: AppBuildContext) {\n if (this.bundler) return this.bundler;\n return this.getDefaultBundler(context);\n }\n private async getDefaultBundler(context: AppBuildContext) {\n const { capsule } = context;\n const reactEnv: ReactEnv = context.env;\n const publicDir = this.getPublicDir(context.artifactsDir);\n const outputPath = join(capsule.path, publicDir);\n const { distDir } = reactEnv.getCompiler();\n const targetEntries = Array.isArray(this.entry) ? this.entry : await this.entry();\n const entries = targetEntries.map((entry) => require.resolve(`${capsule.path}/${distDir}/${basename(entry)}`));\n const staticDir = join(outputPath, this.dir);\n\n const bundlerContext: BundlerContext = Object.assign(context, {\n targets: [\n {\n components: [capsule?.component],\n entries,\n outputPath,\n hostDependencies: await this.getPeers(),\n aliasHostDependencies: true,\n },\n ],\n entry: [],\n rootPath: '/',\n metaData: {\n initiator: `building app: ${context.name}`,\n envId: context.id,\n },\n });\n\n const defaultTransformer: WebpackConfigTransformer = (configMutator) => {\n const config = configMutator.addTopLevel('output', { path: staticDir, publicPath: `/` });\n if (this.prerender) config.addPlugin(prerenderPlugin(this.prerender));\n if (config.raw.optimization?.minimizer) {\n remove(config.raw.optimization?.minimizer, (minimizer) => {\n return minimizer.constructor.name === 'TerserPlugin';\n });\n\n config.raw.optimization?.minimizer.push(this.getESBuildConfig());\n }\n\n return config;\n };\n const transformers = [defaultTransformer, ...this.transformers];\n const bundler: Bundler = await reactEnv.getBundler(bundlerContext, transformers);\n return bundler;\n }\n private getESBuildConfig = (isPrerendering = this.prerender) => {\n // We don't want to use esbuild in case of prerendering since the headless browser puppeteer doesn't support\n // the output of esbuild\n\n if (isPrerendering) {\n return 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 }\n return 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 terserOptions: {\n minify: true,\n },\n });\n };\n\n private getPublicDir(artifactsDir: string) {\n return join(artifactsDir, this.applicationType, this.name);\n }\n\n async getEntries(): Promise<string[]> {\n if (Array.isArray(this.entry)) return this.entry;\n return this.entry();\n }\n\n private async getDevServerContext(context: AppContext): Promise<DevServerContext> {\n const entries = await this.getEntries();\n return Object.assign(context, {\n entry: entries,\n rootPath: '',\n publicPath: `public/${this.name}`,\n title: this.name,\n favicon: this.favicon,\n hostDependencies: await this.getPeers(),\n aliasHostDependencies: true,\n });\n }\n\n private getPeers(): Promise<string[]> {\n return this.reactEnv.getPeerDependenciesList();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,QAAN,CAAsC;EAC3CC,WAAW,CACAC,IADA,EAEAC,KAFA,EAGAC,SAHA,EAIDC,QAJC,EAKAC,SALA,EAMAC,OANA,EAOAC,SAPA,EAQAC,YAAwC,GAAG,EAR3C,EASAC,MATA,EAUAC,OAVA,EAWT;IAAA,KAVST,IAUT,GAVSA,I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A,MAAMF,OAAgB,GAAG,MAAMF,QAAQ,CAACkD,UAAT,CAAoBwB,cAApB,EAAoCtE,YAApC,CAA/B;IACA,OAAOF,OAAP;EACD;;EAsDOoD,YAAY,CAACC,YAAD,EAAuB;IACzC,OAAO,IAAAM,YAAA,EAAKN,YAAL,EAAmB,KAAKwC,eAAxB,EAAyC,KAAKlG,IAA9C,CAAP;EACD;;EAEe,MAAVmG,UAAU,GAAsB;IACpC,IAAI9B,KAAK,CAACC,OAAN,CAAc,KAAKrE,KAAnB,CAAJ,EAA+B,OAAO,KAAKA,KAAZ;IAC/B,OAAO,KAAKA,KAAL,EAAP;EACD;;EAEgC,MAAnBmC,mBAAmB,CAACR,OAAD,EAAiD;IAChF,MAAM2C,OAAO,GAAG,MAAM,KAAK4B,UAAL,EAAtB;IACA,OAAOhD,MAAM,CAACC,MAAP,CAAcxB,OAAd,EAAuB;MAC5B3B,KAAK,EAAEsE,OADqB;MAE5Ba,QAAQ,EAAE,EAFkB;MAG5BvC,UAAU,EAAG,UAAS,KAAK7C,IAAK,EAHJ;MAI5BgD,KAAK,EAAE,KAAKhD,IAJgB;MAK5BS,OAAO,EAAE,KAAKA,OALc;MAM5BwE,gBAAgB,EAAE,MAAM,KAAKC,QAAL,EANI;MAO5BC,qBAAqB,EAAE;IAPK,CAAvB,CAAP;EASD;;EAEOD,QAAQ,GAAsB;IACpC,OAAO,KAAK/E,QAAL,CAAciG,uBAAd,EAAP;EACD;;AAhM0C"}
|
|
File without changes
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.788",
|
|
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.
|
|
9
|
+
"version": "0.0.788"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
@@ -79,37 +79,37 @@
|
|
|
79
79
|
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
80
80
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.163",
|
|
81
81
|
"@teambit/design.ui.tooltip": "0.0.352",
|
|
82
|
-
"@teambit/builder": "0.0.
|
|
83
|
-
"@teambit/bundler": "0.0.
|
|
84
|
-
"@teambit/compiler": "0.0.
|
|
82
|
+
"@teambit/builder": "0.0.788",
|
|
83
|
+
"@teambit/bundler": "0.0.788",
|
|
84
|
+
"@teambit/compiler": "0.0.788",
|
|
85
85
|
"@teambit/component.modules.component-url": "0.0.125",
|
|
86
|
-
"@teambit/component": "0.0.
|
|
87
|
-
"@teambit/dependency-resolver": "0.0.
|
|
88
|
-
"@teambit/envs": "0.0.
|
|
89
|
-
"@teambit/eslint": "0.0.
|
|
90
|
-
"@teambit/formatter": "0.0.
|
|
91
|
-
"@teambit/jest": "0.0.
|
|
92
|
-
"@teambit/linter": "0.0.
|
|
93
|
-
"@teambit/logger": "0.0.
|
|
94
|
-
"@teambit/pkg": "0.0.
|
|
95
|
-
"@teambit/prettier": "0.0.
|
|
86
|
+
"@teambit/component": "0.0.788",
|
|
87
|
+
"@teambit/dependency-resolver": "0.0.788",
|
|
88
|
+
"@teambit/envs": "0.0.788",
|
|
89
|
+
"@teambit/eslint": "0.0.788",
|
|
90
|
+
"@teambit/formatter": "0.0.339",
|
|
91
|
+
"@teambit/jest": "0.0.788",
|
|
92
|
+
"@teambit/linter": "0.0.788",
|
|
93
|
+
"@teambit/logger": "0.0.614",
|
|
94
|
+
"@teambit/pkg": "0.0.788",
|
|
95
|
+
"@teambit/prettier": "0.0.339",
|
|
96
96
|
"@teambit/react.ui.compositions-app": "0.0.1",
|
|
97
97
|
"@teambit/react.ui.docs-app": "0.0.181",
|
|
98
98
|
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.21",
|
|
99
|
-
"@teambit/schema": "0.0.
|
|
100
|
-
"@teambit/tester": "0.0.
|
|
101
|
-
"@teambit/typescript": "0.0.
|
|
102
|
-
"@teambit/webpack": "0.0.
|
|
103
|
-
"@teambit/workspace": "0.0.
|
|
104
|
-
"@teambit/application": "0.0.
|
|
105
|
-
"@teambit/cli": "0.0.
|
|
106
|
-
"@teambit/generator": "0.0.
|
|
107
|
-
"@teambit/graphql": "0.0.
|
|
108
|
-
"@teambit/preview": "0.0.
|
|
99
|
+
"@teambit/schema": "0.0.788",
|
|
100
|
+
"@teambit/tester": "0.0.788",
|
|
101
|
+
"@teambit/typescript": "0.0.788",
|
|
102
|
+
"@teambit/webpack": "0.0.788",
|
|
103
|
+
"@teambit/workspace": "0.0.788",
|
|
104
|
+
"@teambit/application": "0.0.430",
|
|
105
|
+
"@teambit/cli": "0.0.521",
|
|
106
|
+
"@teambit/generator": "0.0.788",
|
|
107
|
+
"@teambit/graphql": "0.0.788",
|
|
108
|
+
"@teambit/preview": "0.0.788",
|
|
109
109
|
"@teambit/react.ui.highlighter-provider": "0.0.190",
|
|
110
|
-
"@teambit/compositions": "0.0.
|
|
111
|
-
"@teambit/ui": "0.0.
|
|
112
|
-
"@teambit/react.eslint-config-bit-react": "0.0.
|
|
110
|
+
"@teambit/compositions": "0.0.788",
|
|
111
|
+
"@teambit/ui": "0.0.788",
|
|
112
|
+
"@teambit/react.eslint-config-bit-react": "0.0.595",
|
|
113
113
|
"@teambit/mdx.modules.mdx-loader": "0.0.490",
|
|
114
114
|
"@teambit/react.babel.bit-react-transformer": "0.0.501",
|
|
115
115
|
"@teambit/webpack.modules.generate-style-loaders": "0.0.103",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"@teambit/component-id": "0.0.402",
|
|
118
118
|
"@teambit/toolbox.network.get-port": "0.0.113",
|
|
119
119
|
"@teambit/react.modules.prerenderer-puppeteer": "0.0.2",
|
|
120
|
-
"@teambit/config": "0.0.
|
|
120
|
+
"@teambit/config": "0.0.534"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
123
|
"@types/react": "^17.0.8",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
|
-
"@teambit/legacy": "1.0.
|
|
139
|
+
"@teambit/legacy": "1.0.303",
|
|
140
140
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
141
141
|
"react": "^16.8.0 || ^17.0.0"
|
|
142
142
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.788/dist/react.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.788/dist/react.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|