@teambit/react 0.0.779 → 0.0.780
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.application.ts +1 -1
- package/artifacts/__bit_junit.xml +2 -2
- package/artifacts/env-template/public/22.df5dcfd6ec82b80f43f1.js +43 -0
- package/artifacts/env-template/public/{244.739752d913aa9b9973e9.js → 244.40a7c02382995372607b.js} +6 -6
- package/artifacts/env-template/public/{830.87975426a2d9aba35cc5.js → 970.c5cde96c68e8fb444a24.js} +34 -34
- package/artifacts/env-template/public/assets-manifest.json +16 -16
- package/artifacts/env-template/public/{compositions.f2bf30aaac737a83f3b2.js → compositions.7f9b3c1d5594a2b8356d.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.e9f25567c914ef048779.js → overview.9f2f451ee3e901539ae2.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{peers.7d1c60e8589952b82b8c.js → peers.a454763fe05a7215f7c5.js} +1 -1
- package/artifacts/env-template/public/{preview-root.267f5147d686b94c6d62.js → preview-root.f0685d3de3c57905ba12.js} +1 -1
- package/artifacts/env-template/public/static/css/{830.c01819bb.css → 970.c0eadd42.css} +1 -1
- package/artifacts/preview/teambit_react_react-preview.js +1 -1
- package/{compositions-1656991770328.js → compositions-1657039361770.js} +0 -0
- package/dist/apps/web/react.application.js.map +1 -1
- package/{overview-1656991770328.js → overview-1657039361770.js} +0 -0
- package/package-tar/teambit-react-0.0.780.tgz +0 -0
- package/package.json +33 -33
- package/{preview-1656991770328.js → preview-1657039361770.js} +2 -2
- package/artifacts/env-template/public/22.7072732251b2fe075054.js +0 -43
- package/package-tar/teambit-react-0.0.779.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},47954:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.779",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__(47954),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||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},67780:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.780",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__(67780),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":["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","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","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[],\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 entries = this.entry.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 private async getDevServerContext(context: AppContext): Promise<DevServerContext> {\n return Object.assign(context, {\n entry: this.entry,\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;IA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YAAL,EAAmB,KAAKqC,eAAxB,EAAyC,KAAK/F,IAA9C,CAAP;EACD;;EAEgC,MAAnBoC,mBAAmB,CAACR,OAAD,EAAiD;IAChF,OAAOuB,MAAM,CAACC,MAAP,CAAcxB,OAAd,EAAuB;MAC5B3B,KAAK,EAAE,KAAKA,KADgB;MAE5BgF,QAAQ,EAAE,EAFkB;MAG5BpC,UAAU,EAAG,UAAS,KAAK7C,IAAK,EAHJ;MAI5BgD,KAAK,EAAE,KAAKhD,IAJgB;MAK5BS,OAAO,EAAE,KAAKA,OALc;MAM5BqE,gBAAgB,EAAE,MAAM,KAAKC,QAAL,EANI;MAO5BC,qBAAqB,EAAE;IAPK,CAAvB,CAAP;EASD;;EAEOD,QAAQ,GAAsB;IACpC,OAAO,KAAK5E,QAAL,CAAc6F,uBAAd,EAAP;EACD;;AAzL0C"}
|
|
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","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","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[],\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 entries = this.entry.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 private async getDevServerContext(context: AppContext): Promise<DevServerContext> {\n return Object.assign(context, {\n entry: this.entry,\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,MAT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AAoCnE,YAApC,CAA/B;IACA,OAAOF,OAAP;EACD;;EAsDOoD,YAAY,CAACC,YAAD,EAAuB;IACzC,OAAO,IAAAM,YAAA,EAAKN,YAAL,EAAmB,KAAKqC,eAAxB,EAAyC,KAAK/F,IAA9C,CAAP;EACD;;EAEgC,MAAnBoC,mBAAmB,CAACR,OAAD,EAAiD;IAChF,OAAOuB,MAAM,CAACC,MAAP,CAAcxB,OAAd,EAAuB;MAC5B3B,KAAK,EAAE,KAAKA,KADgB;MAE5BgF,QAAQ,EAAE,EAFkB;MAG5BpC,UAAU,EAAG,UAAS,KAAK7C,IAAK,EAHJ;MAI5BgD,KAAK,EAAE,KAAKhD,IAJgB;MAK5BS,OAAO,EAAE,KAAKA,OALc;MAM5BqE,gBAAgB,EAAE,MAAM,KAAKC,QAAL,EANI;MAO5BC,qBAAqB,EAAE;IAPK,CAAvB,CAAP;EASD;;EAEOD,QAAQ,GAAsB;IACpC,OAAO,KAAK5E,QAAL,CAAc6F,uBAAd,EAAP;EACD;;AAzL0C"}
|
|
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.780",
|
|
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.780"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"react-error-boundary": "^3.0.0",
|
|
@@ -79,40 +79,40 @@
|
|
|
79
79
|
"@teambit/harmony": "0.3.3",
|
|
80
80
|
"@teambit/react.instructions.react.adding-compositions": "0.0.6",
|
|
81
81
|
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
82
|
-
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.
|
|
83
|
-
"@teambit/preview": "0.0.
|
|
82
|
+
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.359",
|
|
83
|
+
"@teambit/preview": "0.0.780",
|
|
84
84
|
"@teambit/react.ui.error-fallback": "0.0.111",
|
|
85
|
-
"@teambit/react.ui.loader-fallback": "0.0.
|
|
85
|
+
"@teambit/react.ui.loader-fallback": "0.0.90",
|
|
86
86
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.163",
|
|
87
87
|
"@teambit/design.ui.tooltip": "0.0.352",
|
|
88
|
-
"@teambit/builder": "0.0.
|
|
89
|
-
"@teambit/bundler": "0.0.
|
|
90
|
-
"@teambit/compiler": "0.0.
|
|
88
|
+
"@teambit/builder": "0.0.780",
|
|
89
|
+
"@teambit/bundler": "0.0.780",
|
|
90
|
+
"@teambit/compiler": "0.0.780",
|
|
91
91
|
"@teambit/component.modules.component-url": "0.0.125",
|
|
92
|
-
"@teambit/component": "0.0.
|
|
93
|
-
"@teambit/dependency-resolver": "0.0.
|
|
94
|
-
"@teambit/envs": "0.0.
|
|
95
|
-
"@teambit/eslint": "0.0.
|
|
96
|
-
"@teambit/formatter": "0.0.
|
|
97
|
-
"@teambit/jest": "0.0.
|
|
98
|
-
"@teambit/linter": "0.0.
|
|
99
|
-
"@teambit/logger": "0.0.
|
|
100
|
-
"@teambit/pkg": "0.0.
|
|
101
|
-
"@teambit/prettier": "0.0.
|
|
92
|
+
"@teambit/component": "0.0.780",
|
|
93
|
+
"@teambit/dependency-resolver": "0.0.780",
|
|
94
|
+
"@teambit/envs": "0.0.780",
|
|
95
|
+
"@teambit/eslint": "0.0.780",
|
|
96
|
+
"@teambit/formatter": "0.0.331",
|
|
97
|
+
"@teambit/jest": "0.0.780",
|
|
98
|
+
"@teambit/linter": "0.0.780",
|
|
99
|
+
"@teambit/logger": "0.0.609",
|
|
100
|
+
"@teambit/pkg": "0.0.780",
|
|
101
|
+
"@teambit/prettier": "0.0.331",
|
|
102
102
|
"@teambit/react.ui.highlighter.component-metadata.bit-component-meta": "0.0.21",
|
|
103
|
-
"@teambit/schema": "0.0.
|
|
104
|
-
"@teambit/tester": "0.0.
|
|
105
|
-
"@teambit/typescript": "0.0.
|
|
106
|
-
"@teambit/webpack": "0.0.
|
|
107
|
-
"@teambit/workspace": "0.0.
|
|
108
|
-
"@teambit/application": "0.0.
|
|
109
|
-
"@teambit/cli": "0.0.
|
|
110
|
-
"@teambit/generator": "0.0.
|
|
111
|
-
"@teambit/graphql": "0.0.
|
|
103
|
+
"@teambit/schema": "0.0.780",
|
|
104
|
+
"@teambit/tester": "0.0.780",
|
|
105
|
+
"@teambit/typescript": "0.0.780",
|
|
106
|
+
"@teambit/webpack": "0.0.780",
|
|
107
|
+
"@teambit/workspace": "0.0.780",
|
|
108
|
+
"@teambit/application": "0.0.422",
|
|
109
|
+
"@teambit/cli": "0.0.516",
|
|
110
|
+
"@teambit/generator": "0.0.780",
|
|
111
|
+
"@teambit/graphql": "0.0.780",
|
|
112
112
|
"@teambit/react.ui.highlighter-provider": "0.0.189",
|
|
113
|
-
"@teambit/compositions": "0.0.
|
|
114
|
-
"@teambit/ui": "0.0.
|
|
115
|
-
"@teambit/react.eslint-config-bit-react": "0.0.
|
|
113
|
+
"@teambit/compositions": "0.0.780",
|
|
114
|
+
"@teambit/ui": "0.0.780",
|
|
115
|
+
"@teambit/react.eslint-config-bit-react": "0.0.590",
|
|
116
116
|
"@teambit/mdx.modules.mdx-loader": "0.0.490",
|
|
117
117
|
"@teambit/react.babel.bit-react-transformer": "0.0.501",
|
|
118
118
|
"@teambit/webpack.modules.generate-style-loaders": "0.0.103",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@teambit/component-id": "0.0.402",
|
|
121
121
|
"@teambit/toolbox.network.get-port": "0.0.113",
|
|
122
122
|
"@teambit/react.modules.prerenderer-puppeteer": "0.0.2",
|
|
123
|
-
"@teambit/config": "0.0.
|
|
123
|
+
"@teambit/config": "0.0.529"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@types/react": "^17.0.8",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
140
140
|
},
|
|
141
141
|
"peerDependencies": {
|
|
142
|
-
"@teambit/legacy": "1.0.
|
|
142
|
+
"@teambit/legacy": "1.0.297",
|
|
143
143
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
144
144
|
"react": "^16.8.0 || ^17.0.0"
|
|
145
145
|
},
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"@types/jest": "^26.0.0"
|
|
204
204
|
},
|
|
205
205
|
"peerDependencies": {
|
|
206
|
-
"@teambit/legacy": "1.0.
|
|
206
|
+
"@teambit/legacy": "1.0.297",
|
|
207
207
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
208
208
|
"react": "^16.8.0 || ^17.0.0"
|
|
209
209
|
}
|
|
@@ -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.780/dist/react.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.780/dist/react.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|