@teambit/react 0.0.717 → 0.0.720
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 +7 -5
- package/artifacts/env-template/public/101.js +1 -1
- package/artifacts/env-template/public/{614.js → 399.js} +2 -2
- package/artifacts/env-template/public/793.js +9 -5
- package/artifacts/env-template/public/assets-manifest.json +10 -10
- package/artifacts/env-template/public/compositions.7bd20ecabc5d3a90b9d0.js +1 -0
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.378c88565abe52e34bb0.js → overview.85cdaa6d67ab2c0d9f28.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{preview-root.5dbc1727c20a2792a7c9.js → preview-root.6342a9856f62d14ba3c9.js} +1 -1
- package/artifacts/env-template/public/service-worker.js +1 -1
- package/artifacts/env-template/public/static/css/793.d675d781.css +1 -0
- package/artifacts/preview/teambit_react_react-preview.js +2 -2
- package/{compositions-1650916592801.js → compositions-1651116285533.js} +0 -0
- package/dist/apps/web/react.application.d.ts +2 -2
- package/dist/apps/web/react.application.js +9 -12
- package/dist/apps/web/react.application.js.map +1 -1
- package/dist/templates/react-env/files/main.runtime.js +1 -1
- package/dist/templates/react-env/files/main.runtime.js.map +1 -1
- package/{overview-1650916592801.js → overview-1651116285533.js} +0 -0
- package/package-tar/teambit-react-0.0.720.tgz +0 -0
- package/package.json +30 -30
- package/{preview-1650916592801.js → preview-1651116285533.js} +2 -2
- package/templates/react-env/files/main.runtime.ts +1 -1
- package/artifacts/env-template/public/compositions.69b50d79dd0b1a101cee.js +0 -1
- package/artifacts/env-template/public/static/css/793.45d86d0b.css +0 -1
- package/package-tar/teambit-react-0.0.717.tgz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(root,factory){typeof exports=="object"&&typeof module=="object"?module.exports=factory():typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?exports["teambit.react/react-preview"]=factory():root["teambit.react/react-preview"]=factory()})(self,function(){return(()=>{var __webpack_modules__={88244:module2=>{function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module2.exports=_interopRequireDefault},
|
|
1
|
+
(function(root,factory){typeof exports=="object"&&typeof module=="object"?module.exports=factory():typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?exports["teambit.react/react-preview"]=factory():root["teambit.react/react-preview"]=factory()})(self,function(){return(()=>{var __webpack_modules__={88244:module2=>{function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}module2.exports=_interopRequireDefault},38941:(__unused_webpack_module,__webpack_exports__2,__webpack_require__2)=>{"use strict";__webpack_require__2.r(__webpack_exports__2),__webpack_require__2.d(__webpack_exports__2,{default:()=>MDXContent});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__2(63804),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__2.n(react__WEBPACK_IMPORTED_MODULE_0__),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__2(85057),_mdx_js_react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__2.n(_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__2(58459),_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__2.n(_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__),_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__2(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,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(_teambit_mdx_ui_mdx_scope_context__WEBPACK_IMPORTED_MODULE_2__.MDXScopeProvider,{components:{ReactOverview:_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__.ZP},mdxType:"MDXScopeProvider"},(0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__.mdx)(_teambit_react_content_react_overview__WEBPACK_IMPORTED_MODULE_3__.ZP,{mdxType:"ReactOverview"})))}MDXContent.isMDXComponent=!0},55906:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __webpack_unused_export__,__bit_component={id:"teambit.react/content/react-overview@1.95.0",homepage:"https://bit.dev/teambit/react/content/react-overview",exported:!0};__webpack_unused_export__={value:!0},__webpack_unused_export__={enumerable:!0,get:function(){return _reactOverview.default}},Object.defineProperty(exports2,"ZP",{enumerable:!0,get:function(){return _reactOverview.default}});var _reactOverview=_interopRequireDefault(__webpack_require__2(2664));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_interopRequireDefault.__bit_component=__bit_component},2664:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/content/react-overview@1.95.0",homepage:"https://bit.dev/teambit/react/content/react-overview",exported:!0};Object.defineProperty(exports2,"__esModule",{value:!0}),exports2.default=MDXContent;var _react=_interopRequireDefault(__webpack_require__2(63804)),_react2=__webpack_require__2(85057),_mdxUi=__webpack_require__2(58459),_excluded=["components"];function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}_interopRequireDefault.__bit_component=__bit_component;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)}_extends.__bit_component=__bit_component;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}_objectWithoutProperties.__bit_component=__bit_component;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}_objectWithoutPropertiesLoose.__bit_component=__bit_component;var layoutProps={},MDXLayout="wrapper";function MDXContent(_ref){var components=_ref.components,props=_objectWithoutProperties(_ref,_excluded);return(0,_react2.mdx)(MDXLayout,_extends({},layoutProps,props,{components,mdxType:"MDXLayout"}),(0,_react2.mdx)(_mdxUi.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"},(0,_react2.mdx)("h1",null,"React Overview"),(0,_react2.mdx)("p",null,`React is teambit's Component Development Environment (Env) for React.
|
|
2
2
|
It enables you to quickly set up a dev environment that follows best practices for React component development.`),(0,_react2.mdx)("p",null,"React can also be used as a good starting point for your own customized Env as it provides a comprehensive API that makes it easy to extend."),(0,_react2.mdx)("h2",null,"Using the React env"),(0,_react2.mdx)("p",null,"To use React Env, apply it on the relevant ",(0,_react2.mdx)("a",{parentName:"p",href:"/docs/workspace/variants"},"variants")," (component selections) in your ",(0,_react2.mdx)("a",{parentName:"p",href:"/docs/workspace/workspace-configuration"},"Workspace config"),":"),(0,_react2.mdx)("pre",null,(0,_react2.mdx)("code",{parentName:"pre",className:"language-json",metastring:'title="workspace.jsonc"',title:'"workspace.jsonc"'},`{
|
|
3
3
|
"teambit.workspace/variants": {
|
|
4
4
|
"{ui/**}": {
|
|
@@ -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},97086:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.717",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__.n=module2=>{var getter=module2&&module2.__esModule?()=>module2.default:()=>module2;return __webpack_require__.d(getter,{a:getter}),getter},__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});const compositions=[__webpack_require__(97086)],overview=[__webpack_require__(53755)]})(),__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},4984:(__unused_webpack_module,exports2,__webpack_require__2)=>{"use strict";var __bit_component={id:"teambit.react/react@0.0.720",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__.n=module2=>{var getter=module2&&module2.__esModule?()=>module2.default:()=>module2;return __webpack_require__.d(getter,{a:getter}),getter},__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});const compositions=[__webpack_require__(4984)],overview=[__webpack_require__(38941)]})(),__webpack_exports__})()});
|
|
File without changes
|
|
@@ -13,10 +13,10 @@ export declare class ReactApp implements Application {
|
|
|
13
13
|
readonly prerender?: ReactAppPrerenderOptions | undefined;
|
|
14
14
|
readonly bundler?: Bundler | undefined;
|
|
15
15
|
readonly devServer?: DevServer | undefined;
|
|
16
|
-
readonly transformers
|
|
16
|
+
readonly transformers: WebpackConfigTransformer[];
|
|
17
17
|
readonly deploy?: ((context: ReactDeployContext) => Promise<void>) | undefined;
|
|
18
18
|
readonly favicon?: string | undefined;
|
|
19
|
-
constructor(name: string, entry: string[], portRange: number[], reactEnv: ReactEnv, prerender?: ReactAppPrerenderOptions | undefined, bundler?: Bundler | undefined, devServer?: DevServer | undefined, transformers?: WebpackConfigTransformer[]
|
|
19
|
+
constructor(name: string, entry: string[], portRange: number[], reactEnv: ReactEnv, prerender?: ReactAppPrerenderOptions | undefined, bundler?: Bundler | undefined, devServer?: DevServer | undefined, transformers?: WebpackConfigTransformer[], deploy?: ((context: ReactDeployContext) => Promise<void>) | undefined, favicon?: string | undefined);
|
|
20
20
|
readonly applicationType = "react-common-js";
|
|
21
21
|
readonly dir = "public";
|
|
22
22
|
run(context: AppContext): Promise<number>;
|
|
@@ -82,7 +82,7 @@ function _webpack() {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
class ReactApp {
|
|
85
|
-
constructor(name, entry, portRange, reactEnv, prerender, bundler, devServer, transformers, deploy, favicon) {
|
|
85
|
+
constructor(name, entry, portRange, reactEnv, prerender, bundler, devServer, transformers = [], deploy, favicon) {
|
|
86
86
|
this.name = name;
|
|
87
87
|
this.entry = entry;
|
|
88
88
|
this.portRange = portRange;
|
|
@@ -159,17 +159,16 @@ class ReactApp {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
const devServerContext = this.getDevServerContext(context);
|
|
162
|
-
const devServer = this.reactEnv.getDevServer(devServerContext, [configMutator => {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
});
|
|
162
|
+
const devServer = this.reactEnv.getDevServer(devServerContext, [configMutator => configMutator.addTopLevel('devServer', {
|
|
163
|
+
historyApiFallback: {
|
|
164
|
+
index: '/index.html',
|
|
165
|
+
disableDotRule: true
|
|
166
|
+
}
|
|
167
|
+
}), configMutator => {
|
|
169
168
|
if (!configMutator.raw.output) configMutator.raw.output = {};
|
|
170
169
|
configMutator.raw.output.publicPath = '/';
|
|
171
170
|
return configMutator;
|
|
172
|
-
}]);
|
|
171
|
+
}, ...this.transformers]);
|
|
173
172
|
await devServer.listen(port);
|
|
174
173
|
return port;
|
|
175
174
|
}
|
|
@@ -198,8 +197,6 @@ class ReactApp {
|
|
|
198
197
|
}
|
|
199
198
|
|
|
200
199
|
async getDefaultBundler(context) {
|
|
201
|
-
var _this$transformers;
|
|
202
|
-
|
|
203
200
|
const {
|
|
204
201
|
capsule
|
|
205
202
|
} = context;
|
|
@@ -246,7 +243,7 @@ class ReactApp {
|
|
|
246
243
|
return config;
|
|
247
244
|
};
|
|
248
245
|
|
|
249
|
-
const transformers = [defaultTransformer, ...
|
|
246
|
+
const transformers = [defaultTransformer, ...this.transformers];
|
|
250
247
|
const bundler = await reactEnv.getBundler(bundlerContext, transformers);
|
|
251
248
|
return bundler;
|
|
252
249
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["react.application.ts"],"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","raw","publicPath","build","htmlConfig","title","templateContent","Object","assign","html","getBundler","publicDir","getPublicDir","dir","getDefaultBundler","capsule","env","outputPath","path","distDir","getCompiler","entries","map","require","resolve","staticDir","bundlerContext","targets","components","component","rootPath","metaData","initiator","envId","id","defaultTransformer","config","addPlugin","optimization","minimizer","push","getESBuildConfig","applicationType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGO,MAAMA,QAAN,CAAsC;AAC3CC,EAAAA,WAAW,CACAC,IADA,EAEAC,KAFA,EAGAC,SAHA,EAIDC,QAJC,EAKAC,SALA,EAMAC,OANA,EAOAC,SAPA,EAQAC,YARA,EASAC,MATA,EAUAC,OAVA,EAWT;AAAA,SAVST,IAUT,GAVSA,IAUT;AAAA,SATSC,KAST,GATSA,KAST;AAAA,SARSC,SAQT,GARSA,SAQT;AAAA,SAPQC,QAOR,GAPQA,QAOR;AAAA,SANSC,SAMT,GANSA,SAMT;AAAA,SALSC,OAKT,GALSA,OAKT;AAAA,SAJSC,SAIT,GAJSA,SAIT;AAAA,SAHSC,YAGT,GAHSA,YAGT;AAAA,SAFSC,MAET,GAFSA,MAET;AAAA,SADSC,OACT,GADSA,OACT;AAAA,6DACyB,iBADzB;AAAA,iDAEa,QAFb;AAAA,8DA8FyB,CAACC,cAAc,GAAG,KAAKN,SAAvB,KAAqC;AAC9D;AACA;AAEA,UAAIM,cAAJ,EAAoB;AAClB,eAAO,KAAIC,8BAAJ,EAAiB;AACtBC,UAAAA,eAAe,EAAE,KADK;AAEtBC,UAAAA,aAAa,EAAE;AACbC,YAAAA,KAAK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B,mCAAmB,KAAK3E,SAAxB,EAAmC+D,SAAnC,CAAjB;;AACpB,mCAAIW,MAAM,CAACnC,GAAP,CAAWqC,YAAf,kDAAI,sBAAyBC,SAA7B,EAAwC;AAAA;;AACtC,wDAAOH,MAAM,CAACnC,GAAP,CAAWqC,YAAlB,2DAAO,uBAAyBC,SAAhC,EAA4CA,SAAD,IAAe;AACxD,iBAAOA,SAAS,CAAClF,WAAV,CAAsBC,IAAtB,KAA+B,cAAtC;AACD,SAFD;AAIA,kCAAA8E,MAAM,CAACnC,GAAP,CAAWqC,YAAX,kFAAyBC,SAAzB,CAAmCC,IAAnC,CAAwC,KAAKC,gBAAL,EAAxC;AACD;;AAED,aAAOL,MAAP;AACD,KAZD;;AAaA,UAAMvE,YAAY,GAAG,CAACsE,kBAAD,EAAqB,0BAAI,KAAKtE,YAAT,mEAAyB,EAAzB,CAArB,CAArB;AACA,UAAMF,OAAgB,GAAG,MAAMF,QAAQ,CAACiD,UAAT,CAAoBgB,cAApB,EAAoC7D,YAApC,CAA/B;AACA,WAAOF,OAAP;AACD;;AAsDOiD,EAAAA,YAAY,GAAG;AACrB,WAAO,kBAAK,KAAK8B,eAAV,EAA2B,KAAKpF,IAAhC,CAAP;AACD;;AAEOoC,EAAAA,mBAAmB,CAACR,OAAD,EAAwC;AACjE,WAAOqB,MAAM,CAACC,MAAP,CAActB,OAAd,EAAuB;AAC5B3B,MAAAA,KAAK,EAAE,KAAKA,KADgB;AAE5BuE,MAAAA,QAAQ,EAAE,EAFkB;AAG5B5B,MAAAA,UAAU,EAAG,UAAS,KAAK5C,IAAK,EAHJ;AAI5B+C,MAAAA,KAAK,EAAE,KAAK/C,IAJgB;AAK5BS,MAAAA,OAAO,EAAE,KAAKA;AALc,KAAvB,CAAP;AAOD;;AA3K0C","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 { prerenderSPAPlugin } from './plugins';\nimport { ReactAppBuildResult } from './react-build-result';\nimport { ReactAppPrerenderOptions } from './react-app-options';\nimport { html } from '../../webpack';\nimport { ReactDeployContext } from '.';\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 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 = 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 },\n });\n\n if (!configMutator.raw.output) configMutator.raw.output = {};\n configMutator.raw.output.publicPath = '/';\n\n return configMutator;\n },\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 await bundler.run();\n return { publicDir: `${this.getPublicDir()}/${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();\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 },\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(prerenderSPAPlugin(this.prerender, staticDir));\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() {\n return join(this.applicationType, this.name);\n }\n\n private getDevServerContext(context: AppContext): 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 });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["react.application.ts"],"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","raw","publicPath","build","htmlConfig","title","templateContent","Object","assign","html","getBundler","publicDir","getPublicDir","dir","getDefaultBundler","capsule","env","outputPath","path","distDir","getCompiler","entries","map","require","resolve","staticDir","bundlerContext","targets","components","component","rootPath","metaData","initiator","envId","id","defaultTransformer","config","addPlugin","optimization","minimizer","push","getESBuildConfig","applicationType"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAGA;AAAA;;AAAA;AAAA;AAAA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MAAP;AACD,KAZD;;AAaA,UAAMvE,YAAY,GAAG,CAACsE,kBAAD,EAAqB,GAAG,KAAKtE,YAA7B,CAArB;AACA,UAAMF,OAAgB,GAAG,MAAMF,QAAQ,CAACiD,UAAT,CAAoBgB,cAApB,EAAoC7D,YAApC,CAA/B;AACA,WAAOF,OAAP;AACD;;AAsDOiD,EAAAA,YAAY,GAAG;AACrB,WAAO,kBAAK,KAAK8B,eAAV,EAA2B,KAAKpF,IAAhC,CAAP;AACD;;AAEOoC,EAAAA,mBAAmB,CAACR,OAAD,EAAwC;AACjE,WAAOqB,MAAM,CAACC,MAAP,CAActB,OAAd,EAAuB;AAC5B3B,MAAAA,KAAK,EAAE,KAAKA,KADgB;AAE5BuE,MAAAA,QAAQ,EAAE,EAFkB;AAG5B5B,MAAAA,UAAU,EAAG,UAAS,KAAK5C,IAAK,EAHJ;AAI5B+C,MAAAA,KAAK,EAAE,KAAK/C,IAJgB;AAK5BS,MAAAA,OAAO,EAAE,KAAKA;AALc,KAAvB,CAAP;AAOD;;AA7K0C","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 { prerenderSPAPlugin } from './plugins';\nimport { ReactAppBuildResult } from './react-build-result';\nimport { ReactAppPrerenderOptions } from './react-app-options';\nimport { html } from '../../webpack';\nimport { ReactDeployContext } from '.';\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 = 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 },\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 await bundler.run();\n return { publicDir: `${this.getPublicDir()}/${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();\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 },\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(prerenderSPAPlugin(this.prerender, staticDir));\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() {\n return join(this.applicationType, this.name);\n }\n\n private getDevServerContext(context: AppContext): 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 });\n }\n}\n"]}
|
|
@@ -20,7 +20,7 @@ import { ${Name}Aspect } from './${name}.aspect';
|
|
|
20
20
|
//import {
|
|
21
21
|
// devConfigTransformer,
|
|
22
22
|
// buildConfigTransformer,
|
|
23
|
-
//} from "./typescript/ts-
|
|
23
|
+
//} from "./typescript/ts-transformer";
|
|
24
24
|
|
|
25
25
|
export class ${Name}Main {
|
|
26
26
|
static slots = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["main.runtime.ts"],"names":["mainRuntimeFile","namePascalCase","Name","name"],"mappings":";;;;;;;AAEO,SAASA,eAAT,CAAyB;AAAEC,EAAAA,cAAc,EAAEC,IAAlB;AAAwBC,EAAAA;AAAxB,CAAzB,EAA2E;AAChF,SAAQ;AACV;AACA;AACA,WAAWD,IAAK,oBAAmBC,IAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeD,IAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAYA,IAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuBA,IAAK;AAC5B,iBAAiBA,IAAK;AACtB;AACA;AACA;AACA,EAAEA,IAAK,qBAAoBA,IAAK;AAChC,CAxFE;AAyFD","sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function mainRuntimeFile({ namePascalCase: Name, name }: ComponentContext) {\n return `import { MainRuntime } from '@teambit/cli';\nimport { ReactAspect, ReactMain } from '@teambit/react';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { ${Name}Aspect } from './${name}.aspect';\n//import {\n// previewConfigTransformer,\n// devServerConfigTransformer\n//} from './webpack/webpack-transformers';\n//import {\n// devConfigTransformer,\n// buildConfigTransformer,\n//} from \"./typescript/ts-
|
|
1
|
+
{"version":3,"sources":["main.runtime.ts"],"names":["mainRuntimeFile","namePascalCase","Name","name"],"mappings":";;;;;;;AAEO,SAASA,eAAT,CAAyB;AAAEC,EAAAA,cAAc,EAAEC,IAAlB;AAAwBC,EAAAA;AAAxB,CAAzB,EAA2E;AAChF,SAAQ;AACV;AACA;AACA,WAAWD,IAAK,oBAAmBC,IAAK;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeD,IAAK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAYA,IAAK;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuBA,IAAK;AAC5B,iBAAiBA,IAAK;AACtB;AACA;AACA;AACA,EAAEA,IAAK,qBAAoBA,IAAK;AAChC,CAxFE;AAyFD","sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function mainRuntimeFile({ namePascalCase: Name, name }: ComponentContext) {\n return `import { MainRuntime } from '@teambit/cli';\nimport { ReactAspect, ReactMain } from '@teambit/react';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { ${Name}Aspect } from './${name}.aspect';\n//import {\n// previewConfigTransformer,\n// devServerConfigTransformer\n//} from './webpack/webpack-transformers';\n//import {\n// devConfigTransformer,\n// buildConfigTransformer,\n//} from \"./typescript/ts-transformer\";\n\nexport class ${Name}Main {\n static slots = [];\n\n static dependencies = [ReactAspect, EnvsAspect];\n\n static runtime = MainRuntime;\n\n //const webpackModifiers: UseWebpackModifiers = {\n // previewConfig: [previewConfigTransformer],\n // devServerConfig: [devServerConfigTransformer],\n //};\n\n //const tsModifiers: UseTypescriptModifiers = {\n // devConfig: [devConfigTransformer],\n // buildConfig: [buildConfigTransformer],\n //};\n\n static async provider([react, envs]: [ReactMain, EnvsMain]) {\n const ${Name}Env = react.compose([\n /**\n * Uncomment to override the config files for TypeScript, Webpack or Jest\n * Your config gets merged with the defaults\n */\n\n // react.useTypescript(tsModifiers), // note: this cannot be used in conjunction with react.overrideCompiler\n // react.useWebpack(webpackModifiers),\n // react.overrideJestConfig(require.resolve('./jest/jest.config')),\n\n /**\n * override the ESLint default config here then check your files for lint errors\n * @example\n * bit lint\n * bit lint --fix\n */\n //react.useEslint({\n // transformers: [\n // (config) => {\n // config.setRule('no-console', ['error']);\n // return config;\n // }\n // ]\n //}),\n\n /**\n * override the Prettier default config here the check your formatting\n * @example\n * bit format --check\n * bit format\n */\n //react.usePrettier({\n // transformers: [\n // (config) => {\n // config.setKey('tabWidth', 2);\n // return config;\n // }\n // ]\n //}),\n\n /**\n * override dependencies here\n * @example\n * Uncomment types to include version 17.0.3 of the types package\n */\n react.overrideDependencies({\n devDependencies: {\n // '@types/react': '17.0.3'\n }\n })\n ]);\n envs.registerEnv(${Name}Env);\n return new ${Name}Main();\n }\n}\n\n${Name}Aspect.addRuntime(${Name}Main);\n`;\n}\n"]}
|
|
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.720",
|
|
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.720"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"react-error-boundary": "^3.0.0",
|
|
@@ -82,38 +82,38 @@
|
|
|
82
82
|
"@teambit/react.instructions.react.adding-compositions": "0.0.6",
|
|
83
83
|
"@teambit/react.instructions.react.adding-tests": "0.0.6",
|
|
84
84
|
"@teambit/design.ui.pages.standalone-not-found-page": "0.0.356",
|
|
85
|
-
"@teambit/preview": "0.0.
|
|
85
|
+
"@teambit/preview": "0.0.720",
|
|
86
86
|
"@teambit/react.ui.error-fallback": "0.0.111",
|
|
87
87
|
"@teambit/react.ui.loader-fallback": "0.0.89",
|
|
88
88
|
"@teambit/compositions.ui.hooks.use-composition": "0.0.163",
|
|
89
89
|
"@teambit/design.ui.tooltip": "0.0.352",
|
|
90
|
-
"@teambit/builder": "0.0.
|
|
91
|
-
"@teambit/bundler": "0.0.
|
|
92
|
-
"@teambit/compiler": "0.0.
|
|
90
|
+
"@teambit/builder": "0.0.720",
|
|
91
|
+
"@teambit/bundler": "0.0.720",
|
|
92
|
+
"@teambit/compiler": "0.0.720",
|
|
93
93
|
"@teambit/component.modules.component-url": "0.0.124",
|
|
94
|
-
"@teambit/component": "0.0.
|
|
95
|
-
"@teambit/envs": "0.0.
|
|
96
|
-
"@teambit/eslint": "0.0.
|
|
97
|
-
"@teambit/formatter": "0.0.
|
|
98
|
-
"@teambit/jest": "0.0.
|
|
99
|
-
"@teambit/linter": "0.0.
|
|
100
|
-
"@teambit/pkg": "0.0.
|
|
101
|
-
"@teambit/prettier": "0.0.
|
|
94
|
+
"@teambit/component": "0.0.720",
|
|
95
|
+
"@teambit/envs": "0.0.720",
|
|
96
|
+
"@teambit/eslint": "0.0.720",
|
|
97
|
+
"@teambit/formatter": "0.0.271",
|
|
98
|
+
"@teambit/jest": "0.0.720",
|
|
99
|
+
"@teambit/linter": "0.0.720",
|
|
100
|
+
"@teambit/pkg": "0.0.720",
|
|
101
|
+
"@teambit/prettier": "0.0.271",
|
|
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/dependency-resolver": "0.0.
|
|
111
|
-
"@teambit/generator": "0.0.
|
|
112
|
-
"@teambit/graphql": "0.0.
|
|
103
|
+
"@teambit/schema": "0.0.720",
|
|
104
|
+
"@teambit/tester": "0.0.720",
|
|
105
|
+
"@teambit/typescript": "0.0.720",
|
|
106
|
+
"@teambit/webpack": "0.0.720",
|
|
107
|
+
"@teambit/workspace": "0.0.720",
|
|
108
|
+
"@teambit/application": "0.0.362",
|
|
109
|
+
"@teambit/cli": "0.0.479",
|
|
110
|
+
"@teambit/dependency-resolver": "0.0.720",
|
|
111
|
+
"@teambit/generator": "0.0.720",
|
|
112
|
+
"@teambit/graphql": "0.0.720",
|
|
113
113
|
"@teambit/react.ui.highlighter-provider": "0.0.189",
|
|
114
|
-
"@teambit/compositions": "0.0.
|
|
115
|
-
"@teambit/ui": "0.0.
|
|
116
|
-
"@teambit/react.eslint-config-bit-react": "0.0.
|
|
114
|
+
"@teambit/compositions": "0.0.720",
|
|
115
|
+
"@teambit/ui": "0.0.720",
|
|
116
|
+
"@teambit/react.eslint-config-bit-react": "0.0.554",
|
|
117
117
|
"@teambit/webpack.modules.generate-expose-loaders": "0.0.3",
|
|
118
118
|
"@teambit/webpack.modules.generate-externals": "0.0.3",
|
|
119
119
|
"@teambit/webpack.modules.config-mutator": "0.0.137",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"@teambit/webpack.modules.style-regexps": "0.0.132",
|
|
124
124
|
"@teambit/component-id": "0.0.402",
|
|
125
125
|
"@teambit/toolbox.network.get-port": "0.0.113",
|
|
126
|
-
"@teambit/config": "0.0.
|
|
126
|
+
"@teambit/config": "0.0.492"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@types/react": "^17.0.8",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"@teambit/react.content.react-overview": "1.95.0"
|
|
143
143
|
},
|
|
144
144
|
"peerDependencies": {
|
|
145
|
-
"@teambit/legacy": "1.0.
|
|
145
|
+
"@teambit/legacy": "1.0.259",
|
|
146
146
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
147
147
|
"react": "^16.8.0 || ^17.0.0"
|
|
148
148
|
},
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
"@types/jest": "^26.0.0"
|
|
207
207
|
},
|
|
208
208
|
"peerDependencies": {
|
|
209
|
-
"@teambit/legacy": "1.0.
|
|
209
|
+
"@teambit/legacy": "1.0.259",
|
|
210
210
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
211
211
|
"react": "^16.8.0 || ^17.0.0"
|
|
212
212
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.720/dist/react.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.react_react@0.0.720/dist/react.docs.mdx')]
|
|
@@ -12,7 +12,7 @@ import { ${Name}Aspect } from './${name}.aspect';
|
|
|
12
12
|
//import {
|
|
13
13
|
// devConfigTransformer,
|
|
14
14
|
// buildConfigTransformer,
|
|
15
|
-
//} from "./typescript/ts-
|
|
15
|
+
//} from "./typescript/ts-transformer";
|
|
16
16
|
|
|
17
17
|
export class ${Name}Main {
|
|
18
18
|
static slots = [];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_teambit_legacy=self.webpackChunk_teambit_legacy||[]).push([[384],{94279:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var _home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(74649),_home_circleci_bit_bit_node_modules_teambit_harmony_dist_index_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(16738),_home_circleci_bit_bit_node_modules_teambit_harmony_dist_index_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(_home_circleci_bit_bit_node_modules_teambit_harmony_dist_index_js__WEBPACK_IMPORTED_MODULE_1__),_home_circleci_bit_bit_node_modules_teambit_react_dist_mount_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(677);(0,_home_circleci_bit_bit_node_modules_teambit_preview_dist_preview_preview_runtime_js__WEBPACK_IMPORTED_MODULE_0__.Bu)("compositions",{mainModule:_home_circleci_bit_bit_node_modules_teambit_react_dist_mount_js__WEBPACK_IMPORTED_MODULE_2__,isSplitComponentBundle:!0,componentMap:{}})}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[283,750,677],()=>__webpack_exec__(94279));var __webpack_exports__=__webpack_require__.O()}]);
|