@teambit/react 0.0.736 → 0.0.739
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/compute-results.ts +18 -0
- package/apps/web/react.application.ts +14 -4
- package/artifacts/env-template/public/295.js +29 -29
- package/artifacts/env-template/public/{117.js → 786.js} +3 -3
- package/artifacts/env-template/public/assets-manifest.json +10 -10
- package/artifacts/env-template/public/{compositions.71a43bb4dd964fdbe6eb.js → compositions.0d00c6a0c95a1629320f.js} +1 -1
- package/artifacts/env-template/public/compositions.html +1 -1
- package/artifacts/env-template/public/{overview.31f8a65a16df86aaec1b.js → overview.dc235d0310255cf655ab.js} +1 -1
- package/artifacts/env-template/public/overview.html +1 -1
- package/artifacts/env-template/public/{preview-root.7a24e602c0fa0ba9f5f1.js → preview-root.4217408043b19c8465c0.js} +1 -1
- package/artifacts/env-template/public/service-worker.js +1 -1
- package/artifacts/env-template/public/static/css/{295.e370e333.css → 295.506aad7a.css} +1 -1
- package/artifacts/preview/teambit_react_react-preview.js +2 -2
- package/{compositions-1652844422371.js → compositions-1653362849981.js} +0 -0
- package/dist/apps/web/compute-results.d.ts +7 -0
- package/dist/apps/web/compute-results.js +21 -0
- package/dist/apps/web/compute-results.js.map +1 -0
- package/dist/apps/web/default-bundler.js.map +1 -1
- package/dist/apps/web/deploy-context.js.map +1 -1
- package/dist/apps/web/index.js.map +1 -1
- package/dist/apps/web/plugins/index.js.map +1 -1
- package/dist/apps/web/plugins/prerender.js.map +1 -1
- package/dist/apps/web/react-app-options.js.map +1 -1
- package/dist/apps/web/react-build-result.js.map +1 -1
- package/dist/apps/web/react.app-type.js.map +1 -1
- package/dist/apps/web/react.application.d.ts +1 -0
- package/dist/apps/web/react.application.js +25 -7
- package/dist/apps/web/react.application.js.map +1 -1
- package/dist/compositions-app.js.map +1 -1
- package/dist/eslint/eslintrc.js.map +1 -1
- package/dist/highlighter-widget.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/jest/index.js.map +1 -1
- package/dist/jest/jest.base.config.js.map +1 -1
- package/dist/jest/jest.cjs.config.js.map +1 -1
- package/dist/jest/jest.config.js.map +1 -1
- package/dist/jest/jest.esm.config.js.map +1 -1
- package/dist/jest/setupTests.js.map +1 -1
- package/dist/jest/transformers/base-transformer-plugins.js.map +1 -1
- package/dist/jest/transformers/base-transformer-presets.js.map +1 -1
- package/dist/jest/transformers/base-transformer-process.js.map +1 -1
- package/dist/jest/transformers/cjs-transformer.js.map +1 -1
- package/dist/jest/transformers/css-transform.js.map +1 -1
- package/dist/jest/transformers/esm-transformer.js.map +1 -1
- package/dist/jest/transformers/file-transform.js.map +1 -1
- package/dist/mount.js.map +1 -1
- package/dist/prettier/prettier.config.js.map +1 -1
- package/dist/react.aspect.js.map +1 -1
- package/dist/react.composition.js.map +1 -1
- package/dist/react.env.d.ts +4 -2
- package/dist/react.env.js +10 -29
- package/dist/react.env.js.map +1 -1
- package/dist/react.graphql.js.map +1 -1
- package/dist/react.main.runtime.d.ts +3 -2
- package/dist/react.main.runtime.js +13 -3
- package/dist/react.main.runtime.js.map +1 -1
- package/dist/react.preview.runtime.js.map +1 -1
- package/dist/react.templates.js.map +1 -1
- package/dist/react.ui.runtime.js.map +1 -1
- package/dist/templates/react-app/files/app-plugin.js.map +1 -1
- package/dist/templates/react-app/files/app-root.js.map +1 -1
- package/dist/templates/react-app/files/app.js.map +1 -1
- package/dist/templates/react-app/files/compositions.js.map +1 -1
- package/dist/templates/react-app/files/doc.js.map +1 -1
- package/dist/templates/react-app/files/index.js.map +1 -1
- package/dist/templates/react-app/index.js.map +1 -1
- package/dist/templates/react-component/files/component.js.map +1 -1
- package/dist/templates/react-component/files/composition.js.map +1 -1
- package/dist/templates/react-component/files/docs.js.map +1 -1
- package/dist/templates/react-component/files/index-file.js.map +1 -1
- package/dist/templates/react-component/files/test.js.map +1 -1
- package/dist/templates/react-component/index.js.map +1 -1
- package/dist/templates/react-component-js/files/component.js.map +1 -1
- package/dist/templates/react-component-js/files/composition.js.map +1 -1
- package/dist/templates/react-component-js/files/docs.js.map +1 -1
- package/dist/templates/react-component-js/files/test.js.map +1 -1
- package/dist/templates/react-component-js/index.js.map +1 -1
- package/dist/templates/react-context/files/composition.js.map +1 -1
- package/dist/templates/react-context/files/context-provider.js.map +1 -1
- package/dist/templates/react-context/files/context.js.map +1 -1
- package/dist/templates/react-context/files/docs.js.map +1 -1
- package/dist/templates/react-context/files/index-file.js.map +1 -1
- package/dist/templates/react-context/files/test.js.map +1 -1
- package/dist/templates/react-context/index.js.map +1 -1
- package/dist/templates/react-env/files/aspect.js.map +1 -1
- package/dist/templates/react-env/files/doc.js.map +1 -1
- package/dist/templates/react-env/files/index.js.map +1 -1
- package/dist/templates/react-env/files/jest.config.js.map +1 -1
- package/dist/templates/react-env/files/main.runtime.js.map +1 -1
- package/dist/templates/react-env/files/preview.runtime.js.map +1 -1
- package/dist/templates/react-env/files/typescript/styles.js.map +1 -1
- package/dist/templates/react-env/files/typescript/ts-transformer.js.map +1 -1
- package/dist/templates/react-env/files/typescript/typescript.config.js.map +1 -1
- package/dist/templates/react-env/files/webpack.config.js.map +1 -1
- package/dist/templates/react-env/index.js.map +1 -1
- package/dist/templates/react-hook/files/component.js.map +1 -1
- package/dist/templates/react-hook/files/composition.js.map +1 -1
- package/dist/templates/react-hook/files/docs.js.map +1 -1
- package/dist/templates/react-hook/files/index-file.js.map +1 -1
- package/dist/templates/react-hook/files/test.js.map +1 -1
- package/dist/templates/react-hook/index.js.map +1 -1
- package/dist/templates/react-workspace/index.js.map +1 -1
- package/dist/templates/react-workspace-analytics/index.js.map +1 -1
- package/dist/templates/react-workspace-app/index.js.map +1 -1
- package/dist/templates/react-workspace-data-fetching/index.js.map +1 -1
- package/dist/templates/react-workspace-deprecated/index.js.map +1 -1
- package/dist/templates/react-workspace-design-system/index.js.map +1 -1
- package/dist/templates/react-workspace-lib/index.js.map +1 -1
- package/dist/templates/react-workspace-wiki/index.js.map +1 -1
- package/dist/templates/workspace-common/files/eslint-config.js.map +1 -1
- package/dist/templates/workspace-common/files/git-ignore.js.map +1 -1
- package/dist/templates/workspace-common/files/launch-json.js.map +1 -1
- package/dist/templates/workspace-common/files/prettier-config.js.map +1 -1
- package/dist/templates/workspace-common/files/readme-file.js.map +1 -1
- package/dist/templates/workspace-common/files/ts-config.js.map +1 -1
- package/dist/templates/workspace-common/files/types/asset.js.map +1 -1
- package/dist/templates/workspace-common/files/types/style.js.map +1 -1
- package/dist/templates/workspace-common/files/workspace-config.js.map +1 -1
- package/dist/templates/workspace-common/generate-files.js.map +1 -1
- package/dist/templates/workspace-common/index.js.map +1 -1
- package/dist/typescript/tsconfig.build.json +1 -0
- package/dist/webpack/html.js.map +1 -1
- package/dist/webpack/index.js.map +1 -1
- package/dist/webpack/overlay/formatWebpackMessages.js.map +1 -1
- package/dist/webpack/overlay/launchEditorEndpoint.js.map +1 -1
- package/dist/webpack/overlay/refreshOverlayInterop.js.map +1 -1
- package/dist/webpack/overlay/webpackHotDevClient.js.map +1 -1
- package/dist/webpack/postcss.config.js.map +1 -1
- package/dist/webpack/webpack.config.base.js.map +1 -1
- package/dist/webpack/webpack.config.base.prod.d.ts +1 -1
- package/dist/webpack/webpack.config.base.prod.js +1 -13
- package/dist/webpack/webpack.config.base.prod.js.map +1 -1
- package/dist/webpack/webpack.config.component.dev.js.map +1 -1
- package/dist/webpack/webpack.config.component.prod.js.map +1 -1
- package/dist/webpack/webpack.config.env.dev.js.map +1 -1
- package/{overview-1652844422371.js → overview-1653362849981.js} +0 -0
- package/package-tar/teambit-react-0.0.739.tgz +0 -0
- package/package.json +26 -33
- package/{preview-1652844422371.js → preview-1653362849981.js} +2 -2
- package/tsconfig.json +1 -1
- package/typescript/tsconfig.build.json +1 -0
- package/webpack/webpack.config.base.prod.ts +1 -5
- package/dist/webpack/get-exposed-rules.d.ts +0 -3
- package/dist/webpack/get-exposed-rules.js +0 -60
- package/dist/webpack/get-exposed-rules.js.map +0 -1
- package/dist/webpack/get-externals.d.ts +0 -1
- package/dist/webpack/get-externals.js +0 -42
- package/dist/webpack/get-externals.js.map +0 -1
- package/dist/webpack/resolve-peer.d.ts +0 -14
- package/dist/webpack/resolve-peer.js +0 -108
- package/dist/webpack/resolve-peer.js.map +0 -1
- package/dist/webpack/transformers.d.ts +0 -10
- package/dist/webpack/transformers.js +0 -66
- package/dist/webpack/transformers.js.map +0 -1
- package/package-tar/teambit-react-0.0.736.tgz +0 -0
- package/webpack/get-exposed-rules.ts +0 -14
- package/webpack/get-externals.ts +0 -8
- package/webpack/resolve-peer.ts +0 -60
- package/webpack/transformers.ts +0 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["gitIgnore"],"sources":["git-ignore.ts"],"sourcesContent":["export function gitIgnore() {\n return `# Bit\n.bit\npublic\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n.history\n\n.DS_Store\n\n`;\n}\n"],"mappings":";;;;;;;AAAO,SAASA,SAAT,GAAqB;EAC1B,OAAQ;AACV;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CA9GE;AA+GD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["launchJson","defaultScope","scopedRegistry","split"],"sources":["launch-json.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\n\nexport function launchJson({ defaultScope }: WorkspaceContext) {\n const scopedRegistry = defaultScope ? `@${defaultScope.split('.')[0]}` : '@my-org';\n return `{\n // Use IntelliSense to learn about possible attributes.\n // Hover to view descriptions of existing attributes.\n // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"type\": \"node\",\n \"request\": \"launch\",\n \"name\": \"test\",\n \"program\": \"\\${workspaceFolder}/node_modules/@teambit/bit/dist/app.js\",\n \"args\": [\"test\"],\n \"resolveSourceMapLocations\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"outFiles\": [\n \"\\${workspaceFolder}/node_modules/${scopedRegistry}/**/*.js\"\n ],\n \"console\": \"integratedTerminal\",\n \"sourceMaps\": true,\n \"internalConsoleOptions\": \"neverOpen\",\n \"cwd\": \"\\${workspaceFolder}\"\n }\n ]\n}`;\n}\n"],"mappings":";;;;;;;;;AAEO,SAASA,UAAT,CAAoB;EAAEC;AAAF,CAApB,EAAwD;EAC7D,MAAMC,cAAc,GAAGD,YAAY,GAAI,IAAGA,YAAY,CAACE,KAAb,CAAmB,GAAnB,EAAwB,CAAxB,CAA2B,EAAlC,GAAsC,SAAzE;EACA,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4CD,cAAe;AAC3D;AACA;AACA,4CAA4CA,cAAe;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAxBE;AAyBD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["prettierConfig"],"sources":["prettier-config.ts"],"sourcesContent":["export const prettierConfig = `const baseConfig = require(\"@teambit/react/prettier/prettier.config\");\nmodule.exports = {\n ...baseConfig,\n};\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAI;AAC/B;AACA;AACA;AACA,CAJO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["readme"],"sources":["readme-file.ts"],"sourcesContent":["export function readme() {\n return `# Welcome to your Bit Workspace\n\nTo get started straight away run \\`bit start\\` and open [localhost:3000](http://localhost:3000). It may take a while to build the first time you run this command as it is building the whole User Interface for your development environment.\n\n\\`\\`\\`bash\nbit start\n\\`\\`\\`\n\n## What's included\n\n- **workspace.jsonc**\n\nThis is the main configuration file of your bit workspace. Here you can modify the workspace name and icon as well as default directory and scope. It is where dependencies are found when you install anything. It is also where you register aspects, bit extensions as well as apply the environments for your components. This workspace has been setup so that all components use the React env. However you can create other components and apply other envs to them such as node, html, angular and aspect envs.\n\n- **.bitmap**\n\nThis is an auto-generated file and includes the mapping of your components. There is one component included here. In order to remove this component you can run the following command.\n\n\n- **Demo Components**\n\nA folder (unless the --empty flag was used) containing demo components are included in this workspace. These components are used to demonstrate the different features of Bit. If you would like to remove these components you can run the following command.\n\n\\`\\`\\`jsx\nbit remove \"ui/*\" --delete files\n\\`\\`\\`\n\nThis removes the components from the bitmap as well as removes the files.\n\n\n- **.gitignore**\n\nIgnoring any files from version control\n`;\n}\n"],"mappings":";;;;;;;AAAO,SAASA,MAAT,GAAkB;EACvB,OAAQ;AACV;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,CAjCE;AAkCD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["tsConfig"],"sources":["ts-config.ts"],"sourcesContent":["export const tsConfig = `{\n \"extends\": \"./node_modules/@teambit/react/typescript/tsconfig.json\",\n // \"include\": [],\n \"compilerOptions\": {\n \"noEmit\": true\n },\n \"exclude\": [\n \"dist\"\n ]\n}`;\n"],"mappings":";;;;;;AAAO,MAAMA,QAAQ,GAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EATO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["assetTypes"],"sources":["asset.ts"],"sourcesContent":["export const assetTypes = `declare module '*.png' {\n const value: any;\n export = value;\n}\ndeclare module '*.svg' {\n import type { FunctionComponent, SVGProps } from 'react';\n\n export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;\n const src: string;\n export default src;\n}\ndeclare module '*.jpg' {\n const value: any;\n export = value;\n}\ndeclare module '*.jpeg' {\n const value: any;\n export = value;\n}\ndeclare module '*.gif' {\n const value: any;\n export = value;\n}\ndeclare module '*.bmp' {\n const value: any;\n export = value;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;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,CA3BO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["styleTypes"],"sources":["style.ts"],"sourcesContent":["export const styleTypes = `declare module '*.module.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\ndeclare module '*.module.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.module.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.less' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.css' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.sass' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.scss' {\n const classes: { readonly [key: string]: string };\n export default classes;\n}\n\ndeclare module '*.mdx' {\n const component: any;\n export default component;\n}\n`;\n"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAI;AAC3B;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,CA1CO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["workspaceConfig","name","defaultScope","scope","configParsed","getWorkspaceConfigTemplateParsed","packageManager","policy","dependencies","peerDependencies","react","variants","parse","configMerged","assign","stringifyWorkspaceConfig"],"sources":["workspace-config.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { getWorkspaceConfigTemplateParsed, stringifyWorkspaceConfig } from '@teambit/config';\nimport { parse, assign } from 'comment-json';\n\nexport async function workspaceConfig({ name, defaultScope }: WorkspaceContext) {\n const scope = defaultScope || 'my-org.my-scope';\n const configParsed = await getWorkspaceConfigTemplateParsed();\n configParsed['teambit.workspace/workspace'].name = name;\n configParsed['teambit.workspace/workspace'].defaultScope = scope;\n configParsed['teambit.dependencies/dependency-resolver'].packageManager = 'teambit.dependencies/pnpm';\n configParsed['teambit.dependencies/dependency-resolver'].policy = {\n dependencies: {\n '@teambit/eslint-config-bit-react': '~0.0.367',\n '@typescript-eslint/eslint-plugin': '4.29.3',\n 'eslint-import-resolver-node': '0.3.6',\n 'eslint-plugin-import': '2.22.1',\n 'eslint-plugin-jest': '24.4.0',\n 'eslint-plugin-jsx-a11y': '6.4.1',\n 'eslint-plugin-mdx': '1.15.0',\n 'eslint-plugin-react': '7.25.1',\n },\n peerDependencies: {\n '@testing-library/react': '12.0.0',\n react: '17.0.2',\n 'react-dom': '17.0.2',\n },\n };\n\n const variants = {\n 'teambit.workspace/variants': parse(`{}`),\n };\n\n const configMerged = assign(configParsed, variants);\n\n return stringifyWorkspaceConfig(configMerged);\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,eAAeA,eAAf,CAA+B;EAAEC,IAAF;EAAQC;AAAR,CAA/B,EAAyE;EAC9E,MAAMC,KAAK,GAAGD,YAAY,IAAI,iBAA9B;EACA,MAAME,YAAY,GAAG,MAAM,IAAAC,0CAAA,GAA3B;EACAD,YAAY,CAAC,6BAAD,CAAZ,CAA4CH,IAA5C,GAAmDA,IAAnD;EACAG,YAAY,CAAC,6BAAD,CAAZ,CAA4CF,YAA5C,GAA2DC,KAA3D;EACAC,YAAY,CAAC,0CAAD,CAAZ,CAAyDE,cAAzD,GAA0E,2BAA1E;EACAF,YAAY,CAAC,0CAAD,CAAZ,CAAyDG,MAAzD,GAAkE;IAChEC,YAAY,EAAE;MACZ,oCAAoC,UADxB;MAEZ,oCAAoC,QAFxB;MAGZ,+BAA+B,OAHnB;MAIZ,wBAAwB,QAJZ;MAKZ,sBAAsB,QALV;MAMZ,0BAA0B,OANd;MAOZ,qBAAqB,QAPT;MAQZ,uBAAuB;IARX,CADkD;IAWhEC,gBAAgB,EAAE;MAChB,0BAA0B,QADV;MAEhBC,KAAK,EAAE,QAFS;MAGhB,aAAa;IAHG;EAX8C,CAAlE;EAkBA,MAAMC,QAAQ,GAAG;IACf,8BAA8B,IAAAC,oBAAA,EAAO,IAAP;EADf,CAAjB;EAIA,MAAMC,YAAY,GAAG,IAAAC,qBAAA,EAAOV,YAAP,EAAqBO,QAArB,CAArB;EAEA,OAAO,IAAAI,kCAAA,EAAyBF,YAAzB,CAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["generateFiles","context","relativePath","content","workspaceConfig","gitIgnore","launchJson","readme","eslintConfig","tsConfig","prettierConfig","assetTypes","styleTypes"],"sources":["generate-files.ts"],"sourcesContent":["import { WorkspaceContext } from '@teambit/generator';\nimport { workspaceConfig } from './files/workspace-config';\nimport { readme } from './files/readme-file';\nimport { gitIgnore } from './files/git-ignore';\nimport { assetTypes } from './files/types/asset';\nimport { styleTypes } from './files/types/style';\nimport { eslintConfig } from './files/eslint-config';\nimport { tsConfig } from './files/ts-config';\nimport { prettierConfig } from './files/prettier-config';\nimport { launchJson } from './files/launch-json';\n\ntype GeneratedFile = {\n relativePath: string;\n content: string;\n};\n\nexport async function generateFiles(context: WorkspaceContext): Promise<GeneratedFile[]> {\n return [\n {\n relativePath: 'workspace.jsonc',\n content: await workspaceConfig(context),\n },\n {\n relativePath: `.gitignore`,\n content: gitIgnore(),\n },\n {\n relativePath: '.vscode/launch.json',\n content: launchJson(context),\n },\n {\n relativePath: `README.md`,\n content: readme(),\n },\n {\n relativePath: `.eslintrc.js`,\n content: eslintConfig,\n },\n {\n relativePath: `tsconfig.json`,\n content: tsConfig,\n },\n {\n relativePath: `.prettierrc.js`,\n content: prettierConfig,\n },\n {\n relativePath: `types/asset.d.ts`,\n content: assetTypes,\n },\n {\n relativePath: `types/style.d.ts`,\n content: styleTypes,\n },\n ];\n}\n"],"mappings":";;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAOO,eAAeA,aAAf,CAA6BC,OAA7B,EAAkF;EACvF,OAAO,CACL;IACEC,YAAY,EAAE,iBADhB;IAEEC,OAAO,EAAE,MAAM,IAAAC,kCAAA,EAAgBH,OAAhB;EAFjB,CADK,EAKL;IACEC,YAAY,EAAG,YADjB;IAEEC,OAAO,EAAE,IAAAE,sBAAA;EAFX,CALK,EASL;IACEH,YAAY,EAAE,qBADhB;IAEEC,OAAO,EAAE,IAAAG,wBAAA,EAAWL,OAAX;EAFX,CATK,EAaL;IACEC,YAAY,EAAG,WADjB;IAEEC,OAAO,EAAE,IAAAI,oBAAA;EAFX,CAbK,EAiBL;IACEL,YAAY,EAAG,cADjB;IAEEC,OAAO,EAAEK;EAFX,CAjBK,EAqBL;IACEN,YAAY,EAAG,eADjB;IAEEC,OAAO,EAAEM;EAFX,CArBK,EAyBL;IACEP,YAAY,EAAG,gBADjB;IAEEC,OAAO,EAAEO;EAFX,CAzBK,EA6BL;IACER,YAAY,EAAG,kBADjB;IAEEC,OAAO,EAAEQ;EAFX,CA7BK,EAiCL;IACET,YAAY,EAAG,kBADjB;IAEEC,OAAO,EAAES;EAFX,CAjCK,CAAP;AAsCD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { generateFiles } from './generate-files';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
|
package/dist/webpack/html.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["html","title"],"sources":["html.ts"],"sourcesContent":["/** html template for Previews (docs, compositions, etc) */\nexport function html(title: string) {\n return `\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>${title}</title>\n <script>\n // Allow to use react dev-tools inside the examples\n try { window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__; } catch {}\n </script>\n <!-- minimal css resets -->\n <style> html { height: 100%; } body { margin: 0; height: 100%; } #root { height: 100%; } </style>\n </head>\n <body>\n <div id=\"root\"></div>\n </body>\n </html>\n `;\n}\n"],"mappings":";;;;;;;AAAA;AACO,SAASA,IAAT,CAAcC,KAAd,EAA6B;EAClC,OAAQ;AACV;AACA;AACA;AACA;AACA;AACA,eAAeA,KAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAlBE;AAmBD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { html } from './html';\n"],"mappings":";;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["friendlySyntaxErrorLabel","isLikelyASyntaxError","message","indexOf","formatMessage","lines","split","Array","isArray","forEach","filter","line","test","map","parsingError","exec","errorLine","errorColumn","errorMessage","join","replace","length","trim","splice","match","index","arr","formatWebpackMessages","json","formattedErrors","errors","formattedWarnings","warnings","result","some","module","exports"],"sources":["formatWebpackMessages.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nconst friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n}\n\n// Cleans up webpack error messages.\nfunction formatMessage(message) {\n let lines = [];\n\n if (typeof message === 'string') {\n lines = message.split('\\n');\n } else if ('message' in message) {\n lines = message['message'].split('\\n');\n } else if (Array.isArray(message)) {\n message.forEach((message) => {\n if ('message' in message) {\n lines = message['message'].split('\\n');\n }\n });\n }\n\n // Strip webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter((line) => !/Module [A-z ]+\\(from/.test(line));\n\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map((line) => {\n const parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n const [, errorLine, errorColumn, errorMessage] = parsingError;\n return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;\n });\n\n message = lines.join('\\n');\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, `${friendlySyntaxErrorLabel} $3 ($1:$2)\\n`);\n // Clean up export errors\n message = message.replace(\n /^.*export '(.+?)' was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$2'.`\n );\n message = message.replace(\n /^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$2' does not contain a default export (imported as '$1').`\n );\n message = message.replace(\n /^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm,\n `Attempted import error: '$1' is not exported from '$3' (imported as '$2').`\n );\n lines = message.split('\\n');\n\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === '') {\n lines.splice(1, 1);\n }\n // Clean up file name\n lines[0] = lines[0].replace(/^(.*) \\d+:\\d+-\\d+$/, '$1');\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n lines[1].replace('Error: ', '').replace('Module not found: Cannot find file:', 'Cannot find file:'),\n ];\n }\n\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n lines[1] = 'To import Sass files, you first need to install sass.\\n';\n lines[1] += 'Run `bit install sass` inside your workspace.';\n }\n\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, ''); // at ... ...:x:y\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, ''); // at <anonymous>\n lines = message.split('\\n');\n\n // Remove duplicated newlines\n lines = lines.filter(\n (line, index, arr) => index === 0 || line.trim() !== '' || line.trim() !== arr[index - 1].trim()\n );\n\n // Reassemble the message\n message = lines.join('\\n');\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n const formattedErrors = json.errors.map(formatMessage);\n const formattedWarnings = json.warnings.map(formatMessage);\n const result = { errors: formattedErrors, warnings: formattedWarnings };\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n return result;\n}\n\nmodule.exports = formatWebpackMessages;\n"],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;AAEA,MAAMA,wBAAwB,GAAG,eAAjC;;AAEA,SAASC,oBAAT,CAA8BC,OAA9B,EAAuC;EACrC,OAAOA,OAAO,CAACC,OAAR,CAAgBH,wBAAhB,MAA8C,CAAC,CAAtD;AACD,C,CAED;;;AACA,SAASI,aAAT,CAAuBF,OAAvB,EAAgC;EAC9B,IAAIG,KAAK,GAAG,EAAZ;;EAEA,IAAI,OAAOH,OAAP,KAAmB,QAAvB,EAAiC;IAC/BG,KAAK,GAAGH,OAAO,CAACI,KAAR,CAAc,IAAd,CAAR;EACD,CAFD,MAEO,IAAI,aAAaJ,OAAjB,EAA0B;IAC/BG,KAAK,GAAGH,OAAO,CAAC,SAAD,CAAP,CAAmBI,KAAnB,CAAyB,IAAzB,CAAR;EACD,CAFM,MAEA,IAAIC,KAAK,CAACC,OAAN,CAAcN,OAAd,CAAJ,EAA4B;IACjCA,OAAO,CAACO,OAAR,CAAiBP,OAAD,IAAa;MAC3B,IAAI,aAAaA,OAAjB,EAA0B;QACxBG,KAAK,GAAGH,OAAO,CAAC,SAAD,CAAP,CAAmBI,KAAnB,CAAyB,IAAzB,CAAR;MACD;IACF,CAJD;EAKD,CAb6B,CAe9B;EACA;;;EACAD,KAAK,GAAGA,KAAK,CAAC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P;AACD;;AAED,SAASK,qBAAT,CAA+BC,IAA/B,EAAqC;EACnC,MAAMC,eAAe,GAAGD,IAAI,CAACE,MAAL,CAAYjB,GAAZ,CAAgBT,aAAhB,CAAxB;EACA,MAAM2B,iBAAiB,GAAGH,IAAI,CAACI,QAAL,CAAcnB,GAAd,CAAkBT,aAAlB,CAA1B;EACA,MAAM6B,MAAM,GAAG;IAAEH,MAAM,EAAED,eAAV;IAA2BG,QAAQ,EAAED;EAArC,CAAf;;EACA,IAAIE,MAAM,CAACH,MAAP,CAAcI,IAAd,CAAmBjC,oBAAnB,CAAJ,EAA8C;IAC5C;IACAgC,MAAM,CAACH,MAAP,GAAgBG,MAAM,CAACH,MAAP,CAAcpB,MAAd,CAAqBT,oBAArB,CAAhB;EACD;;EACD,OAAOgC,MAAP;AACD;;AAEDE,MAAM,CAACC,OAAP,GAAiBT,qBAAjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["module","exports"],"sources":["launchEditorEndpoint.js"],"sourcesContent":["/* eslint-disable */\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\n// TODO: we might want to make this injectable to support DEV-time non-root URLs.\nmodule.exports = '/__open-stack-frame-in-editor';\n"],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA,a,CAEA;;AACAA,MAAM,CAACC,OAAP,GAAiB,+BAAjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["dismissRuntimeErrors","reportRuntimeError","require","module","exports","clearRuntimeErrors","handleRuntimeError"],"sources":["refreshOverlayInterop.js"],"sourcesContent":["/* eslint-disable */\n/** this file was copied as is from react-dev-utils/refreshOverlayInterop */\n\n// @remove-on-eject-begin\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// @remove-on-eject-end\n'use strict';\n\nconst { dismissRuntimeErrors, reportRuntimeError } = require('react-error-overlay');\n\nmodule.exports = {\n clearRuntimeErrors: dismissRuntimeErrors,\n handleRuntimeError: reportRuntimeError,\n};\n"],"mappings":"AAAA;;AACA;AAEA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM;EAAEA,oBAAF;EAAwBC;AAAxB,IAA+CC,OAAO,CAAC,qBAAD,CAA5D;;AAEAC,MAAM,CAACC,OAAP,GAAiB;EACfC,kBAAkB,EAAEL,oBADL;EAEfM,kBAAkB,EAAEL;AAFL,CAAjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpackHotDevClient.js"],"names":["stripAnsi","require","url","launchEditorEndpoint","formatWebpackMessages","ErrorOverlay","setEditorHandler","editorHandler","errorLocation","fetch","window","encodeURIComponent","fileName","lineNumber","colNumber","hadRuntimeError","startReportingRuntimeErrors","onError","filename","module","hot","dispose","stopReportingRuntimeErrors","querystring","id","substring","indexOf","urlParams","URLSearchParams","connection","WebSocket","format","protocol","location","hostname","port","pathname","get","slashes","onclose","console","info","isFirstCompilation","mostRecentCompilationHash","hasCompileErrors","clearOutdatedErrors","clear","handleSuccess","isHotUpdate","tryApplyUpdates","onHotUpdateSuccess","tryDismissErrorOverlay","handleWarnings","warnings","printWarnings","formatted","errors","warn","i","length","onSuccessfulHotUpdate","handleErrors","reportBuildError","error","dismissBuildError","handleAvailableHash","hash","onmessage","e","message","JSON","parse","data","type","reload","isUpdateAvailable","__webpack_hash__","canApplyUpdates","status","canAcceptErrors","hasReactRefresh","process","env","FAST_REFRESH","handleApplyUpdates","err","updatedModules","haveErrors","needsForcedReload","result","check","then"],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA,a,CAEA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;AAEA,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,QAAIyB,iBAAiB,EAArB,EAAyB;AACvB;AACA1B,MAAAA,eAAe;AAChB;AACF,GAhC0C,CAkC3C;;;AACA,MAAIwC,MAAM,GAAGtE,MAAM,CAACC,GAAP,CAAWsE,KAAX;AAAiB;AAAgB,MAAjC,EAAuCN,kBAAvC,CAAb,CAnC2C,CAqC3C;;AACA,MAAIK,MAAM,IAAIA,MAAM,CAACE,IAArB,EAA2B;AACzBF,IAAAA,MAAM,CAACE,IAAP,CACE,UAAUL,cAAV,EAA0B;AACxBF,MAAAA,kBAAkB,CAAC,IAAD,EAAOE,cAAP,CAAlB;AACD,KAHH,EAIE,UAAUD,GAAV,EAAe;AACbD,MAAAA,kBAAkB,CAACC,GAAD,EAAM,IAAN,CAAlB;AACD,KANH;AAQD;AACF","sourcesContent":["/* eslint-disable */\n/*\n * this file was copied as is from `react-dev-utils/webpackHotDevClient`\n * and adjusted for our socket url.\n *\n * we use just set process.env.WDS_* with the EnvironmentPlugin or DefinePlugin\n * once we get react-error-overlay up and running again\n */\n\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n// This alternative WebpackDevServer combines the functionality of:\n// https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js\n// https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js\n\n// It only supports their simplest configuration (hot updates on same server).\n// It makes some opinionated choices on top, like adding a syntax error overlay\n// that looks similar to our console output. The error overlay is inspired by:\n// https://github.com/glenjamin/webpack-hot-middleware\n\nvar stripAnsi = require('strip-ansi');\nvar url = require('url');\nvar launchEditorEndpoint = require('./launchEditorEndpoint');\nvar formatWebpackMessages = require('./formatWebpackMessages');\nvar ErrorOverlay = require('react-error-overlay');\n\nErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {\n // Keep this sync with errorOverlayMiddleware.js\n fetch(\n launchEditorEndpoint +\n '?fileName=' +\n window.encodeURIComponent(errorLocation.fileName) +\n '&lineNumber=' +\n window.encodeURIComponent(errorLocation.lineNumber || 1) +\n '&colNumber=' +\n window.encodeURIComponent(errorLocation.colNumber || 1)\n );\n});\n\n// We need to keep track of if there has been a runtime error.\n// Essentially, we cannot guarantee application state was not corrupted by the\n// runtime error. To prevent confusing behavior, we forcibly reload the entire\n// application. This is handled below when we are notified of a compile (code\n// change).\n// See https://github.com/facebook/create-react-app/issues/3096\nvar hadRuntimeError = false;\nErrorOverlay.startReportingRuntimeErrors({\n onError: function () {\n hadRuntimeError = true;\n },\n filename: '/static/js/bundle.js',\n});\n\nif (module.hot && typeof module.hot.dispose === 'function') {\n module.hot.dispose(function () {\n // TODO: why do we need this?\n ErrorOverlay.stopReportingRuntimeErrors();\n });\n}\n\nconst querystring = module.id.substring(module.id.indexOf('?'));\nconst urlParams = new URLSearchParams(querystring);\n\n// Connect to WebpackDevServer via a socket.\nvar connection = new WebSocket(\n url.format({\n protocol: window.location.protocol === 'https:' ? 'wss' : 'ws',\n hostname: window.location.hostname,\n port: window.location.port,\n pathname: urlParams.get('sockPath') || '/ws',\n slashes: true,\n })\n);\n\n// Unlike WebpackDevServer client, we won't try to reconnect\n// to avoid spamming the console. Disconnect usually happens\n// when developer stops the server.\nconnection.onclose = function () {\n if (typeof console !== 'undefined' && typeof console.info === 'function') {\n console.info('The development server has disconnected.\\nRefresh the page if necessary.');\n }\n};\n\n// Remember some state related to hot module replacement.\nvar isFirstCompilation = true;\nvar mostRecentCompilationHash = null;\nvar hasCompileErrors = false;\n\nfunction clearOutdatedErrors() {\n // Clean up outdated compile errors, if any.\n if (typeof console !== 'undefined' && typeof console.clear === 'function') {\n if (hasCompileErrors) {\n console.clear();\n }\n }\n}\n\n// Successful compilation.\nfunction handleSuccess() {\n clearOutdatedErrors();\n\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onHotUpdateSuccess() {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n tryDismissErrorOverlay();\n });\n }\n}\n\n// Compilation with warnings (e.g. ESLint).\nfunction handleWarnings(warnings) {\n clearOutdatedErrors();\n\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n\n function printWarnings() {\n // Print warnings to the console.\n var formatted = formatWebpackMessages({\n warnings: warnings,\n errors: [],\n });\n\n if (typeof console !== 'undefined' && typeof console.warn === 'function') {\n for (var i = 0; i < formatted.warnings.length; i++) {\n if (i === 5) {\n console.warn('There were more warnings in other files.\\n' + 'You can find a complete log in the terminal.');\n break;\n }\n console.warn(stripAnsi(formatted.warnings[i]));\n }\n }\n }\n\n printWarnings();\n\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onSuccessfulHotUpdate() {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n tryDismissErrorOverlay();\n });\n }\n}\n\n// Compilation with errors (e.g. syntax error or missing modules).\nfunction handleErrors(errors) {\n clearOutdatedErrors();\n\n isFirstCompilation = false;\n hasCompileErrors = true;\n\n // \"Massage\" webpack messages.\n var formatted = formatWebpackMessages({\n errors: errors,\n warnings: [],\n });\n\n // Only show the first error.\n ErrorOverlay.reportBuildError(formatted.errors[0]);\n\n // Also log them to the console.\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n for (var i = 0; i < formatted.errors.length; i++) {\n console.error(stripAnsi(formatted.errors[i]));\n }\n }\n\n // Do not attempt to reload now.\n // We will reload on next success instead.\n}\n\nfunction tryDismissErrorOverlay() {\n if (!hasCompileErrors) {\n ErrorOverlay.dismissBuildError();\n }\n}\n\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash) {\n // Update last known compilation hash.\n mostRecentCompilationHash = hash;\n}\n\n// Handle messages from the server.\nconnection.onmessage = function (e) {\n var message = JSON.parse(e.data);\n switch (message.type) {\n case 'hash':\n handleAvailableHash(message.data);\n break;\n case 'still-ok':\n case 'ok':\n handleSuccess();\n break;\n case 'content-changed':\n // Triggered when a file from `contentBase` changed.\n window.location.reload();\n break;\n case 'warnings':\n handleWarnings(message.data);\n break;\n case 'errors':\n handleErrors(message.data);\n break;\n default:\n // Do nothing.\n }\n};\n\n// Is there a newer version of this code available?\nfunction isUpdateAvailable() {\n /* globals __webpack_hash__ */\n // __webpack_hash__ is the hash of the current compilation.\n // It's a global variable injected by webpack.\n return mostRecentCompilationHash !== __webpack_hash__;\n}\n\n// webpack disallows updates in other states.\nfunction canApplyUpdates() {\n return module.hot.status() === 'idle';\n}\n\nfunction canAcceptErrors() {\n // NOTE: This var is injected by Webpack's DefinePlugin, and is a boolean instead of string.\n const hasReactRefresh = process.env.FAST_REFRESH;\n\n const status = module.hot.status();\n // React refresh can handle hot-reloading over errors.\n // However, when hot-reload status is abort or fail,\n // it indicates the current update cannot be applied safely,\n // and thus we should bail out to a forced reload for consistency.\n return hasReactRefresh && ['abort', 'fail'].indexOf(status) === -1;\n}\n\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdates(onHotUpdateSuccess) {\n if (!module.hot) {\n // HotModuleReplacementPlugin is not in webpack configuration.\n window.location.reload();\n return;\n }\n\n if (!isUpdateAvailable() || !canApplyUpdates()) {\n return;\n }\n\n function handleApplyUpdates(err, updatedModules) {\n const haveErrors = err || hadRuntimeError;\n // When there is no error but updatedModules is unavailable,\n // it indicates a critical failure in hot-reloading,\n // e.g. server is not ready to serve new bundle,\n // and hence we need to do a forced reload.\n const needsForcedReload = !err && !updatedModules;\n if ((haveErrors && !canAcceptErrors()) || needsForcedReload) {\n window.location.reload();\n return;\n }\n\n if (typeof onHotUpdateSuccess === 'function') {\n // Maybe we want to do something.\n onHotUpdateSuccess();\n }\n\n if (isUpdateAvailable()) {\n // While we were updating, there was a new update! Do it again.\n tryApplyUpdates();\n }\n }\n\n // https://webpack.github.io/docs/hot-module-replacement.html#check\n var result = module.hot.check(/* autoApply */ true, handleApplyUpdates);\n\n // // webpack 2 returns a Promise instead of invoking a callback\n if (result && result.then) {\n result.then(\n function (updatedModules) {\n handleApplyUpdates(null, updatedModules);\n },\n function (err) {\n handleApplyUpdates(err, null);\n }\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"names":["stripAnsi","require","url","launchEditorEndpoint","formatWebpackMessages","ErrorOverlay","setEditorHandler","editorHandler","errorLocation","fetch","window","encodeURIComponent","fileName","lineNumber","colNumber","hadRuntimeError","startReportingRuntimeErrors","onError","filename","module","hot","dispose","stopReportingRuntimeErrors","querystring","id","substring","indexOf","urlParams","URLSearchParams","connection","WebSocket","format","protocol","location","hostname","port","pathname","get","slashes","onclose","console","info","isFirstCompilation","mostRecentCompilationHash","hasCompileErrors","clearOutdatedErrors","clear","handleSuccess","isHotUpdate","tryApplyUpdates","onHotUpdateSuccess","tryDismissErrorOverlay","handleWarnings","warnings","printWarnings","formatted","errors","warn","i","length","onSuccessfulHotUpdate","handleErrors","reportBuildError","error","dismissBuildError","handleAvailableHash","hash","onmessage","e","message","JSON","parse","data","type","reload","isUpdateAvailable","__webpack_hash__","canApplyUpdates","status","canAcceptErrors","hasReactRefresh","process","env","FAST_REFRESH","handleApplyUpdates","err","updatedModules","haveErrors","needsForcedReload","result","check","then"],"sources":["webpackHotDevClient.js"],"sourcesContent":["/* eslint-disable */\n/*\n * this file was copied as is from `react-dev-utils/webpackHotDevClient`\n * and adjusted for our socket url.\n *\n * we use just set process.env.WDS_* with the EnvironmentPlugin or DefinePlugin\n * once we get react-error-overlay up and running again\n */\n\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n// This alternative WebpackDevServer combines the functionality of:\n// https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js\n// https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js\n\n// It only supports their simplest configuration (hot updates on same server).\n// It makes some opinionated choices on top, like adding a syntax error overlay\n// that looks similar to our console output. The error overlay is inspired by:\n// https://github.com/glenjamin/webpack-hot-middleware\n\nvar stripAnsi = require('strip-ansi');\nvar url = require('url');\nvar launchEditorEndpoint = require('./launchEditorEndpoint');\nvar formatWebpackMessages = require('./formatWebpackMessages');\nvar ErrorOverlay = require('react-error-overlay');\n\nErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {\n // Keep this sync with errorOverlayMiddleware.js\n fetch(\n launchEditorEndpoint +\n '?fileName=' +\n window.encodeURIComponent(errorLocation.fileName) +\n '&lineNumber=' +\n window.encodeURIComponent(errorLocation.lineNumber || 1) +\n '&colNumber=' +\n window.encodeURIComponent(errorLocation.colNumber || 1)\n );\n});\n\n// We need to keep track of if there has been a runtime error.\n// Essentially, we cannot guarantee application state was not corrupted by the\n// runtime error. To prevent confusing behavior, we forcibly reload the entire\n// application. This is handled below when we are notified of a compile (code\n// change).\n// See https://github.com/facebook/create-react-app/issues/3096\nvar hadRuntimeError = false;\nErrorOverlay.startReportingRuntimeErrors({\n onError: function () {\n hadRuntimeError = true;\n },\n filename: '/static/js/bundle.js',\n});\n\nif (module.hot && typeof module.hot.dispose === 'function') {\n module.hot.dispose(function () {\n // TODO: why do we need this?\n ErrorOverlay.stopReportingRuntimeErrors();\n });\n}\n\nconst querystring = module.id.substring(module.id.indexOf('?'));\nconst urlParams = new URLSearchParams(querystring);\n\n// Connect to WebpackDevServer via a socket.\nvar connection = new WebSocket(\n url.format({\n protocol: window.location.protocol === 'https:' ? 'wss' : 'ws',\n hostname: window.location.hostname,\n port: window.location.port,\n pathname: urlParams.get('sockPath') || '/ws',\n slashes: true,\n })\n);\n\n// Unlike WebpackDevServer client, we won't try to reconnect\n// to avoid spamming the console. Disconnect usually happens\n// when developer stops the server.\nconnection.onclose = function () {\n if (typeof console !== 'undefined' && typeof console.info === 'function') {\n console.info('The development server has disconnected.\\nRefresh the page if necessary.');\n }\n};\n\n// Remember some state related to hot module replacement.\nvar isFirstCompilation = true;\nvar mostRecentCompilationHash = null;\nvar hasCompileErrors = false;\n\nfunction clearOutdatedErrors() {\n // Clean up outdated compile errors, if any.\n if (typeof console !== 'undefined' && typeof console.clear === 'function') {\n if (hasCompileErrors) {\n console.clear();\n }\n }\n}\n\n// Successful compilation.\nfunction handleSuccess() {\n clearOutdatedErrors();\n\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onHotUpdateSuccess() {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n tryDismissErrorOverlay();\n });\n }\n}\n\n// Compilation with warnings (e.g. ESLint).\nfunction handleWarnings(warnings) {\n clearOutdatedErrors();\n\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n\n function printWarnings() {\n // Print warnings to the console.\n var formatted = formatWebpackMessages({\n warnings: warnings,\n errors: [],\n });\n\n if (typeof console !== 'undefined' && typeof console.warn === 'function') {\n for (var i = 0; i < formatted.warnings.length; i++) {\n if (i === 5) {\n console.warn('There were more warnings in other files.\\n' + 'You can find a complete log in the terminal.');\n break;\n }\n console.warn(stripAnsi(formatted.warnings[i]));\n }\n }\n }\n\n printWarnings();\n\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onSuccessfulHotUpdate() {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n tryDismissErrorOverlay();\n });\n }\n}\n\n// Compilation with errors (e.g. syntax error or missing modules).\nfunction handleErrors(errors) {\n clearOutdatedErrors();\n\n isFirstCompilation = false;\n hasCompileErrors = true;\n\n // \"Massage\" webpack messages.\n var formatted = formatWebpackMessages({\n errors: errors,\n warnings: [],\n });\n\n // Only show the first error.\n ErrorOverlay.reportBuildError(formatted.errors[0]);\n\n // Also log them to the console.\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n for (var i = 0; i < formatted.errors.length; i++) {\n console.error(stripAnsi(formatted.errors[i]));\n }\n }\n\n // Do not attempt to reload now.\n // We will reload on next success instead.\n}\n\nfunction tryDismissErrorOverlay() {\n if (!hasCompileErrors) {\n ErrorOverlay.dismissBuildError();\n }\n}\n\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash) {\n // Update last known compilation hash.\n mostRecentCompilationHash = hash;\n}\n\n// Handle messages from the server.\nconnection.onmessage = function (e) {\n var message = JSON.parse(e.data);\n switch (message.type) {\n case 'hash':\n handleAvailableHash(message.data);\n break;\n case 'still-ok':\n case 'ok':\n handleSuccess();\n break;\n case 'content-changed':\n // Triggered when a file from `contentBase` changed.\n window.location.reload();\n break;\n case 'warnings':\n handleWarnings(message.data);\n break;\n case 'errors':\n handleErrors(message.data);\n break;\n default:\n // Do nothing.\n }\n};\n\n// Is there a newer version of this code available?\nfunction isUpdateAvailable() {\n /* globals __webpack_hash__ */\n // __webpack_hash__ is the hash of the current compilation.\n // It's a global variable injected by webpack.\n return mostRecentCompilationHash !== __webpack_hash__;\n}\n\n// webpack disallows updates in other states.\nfunction canApplyUpdates() {\n return module.hot.status() === 'idle';\n}\n\nfunction canAcceptErrors() {\n // NOTE: This var is injected by Webpack's DefinePlugin, and is a boolean instead of string.\n const hasReactRefresh = process.env.FAST_REFRESH;\n\n const status = module.hot.status();\n // React refresh can handle hot-reloading over errors.\n // However, when hot-reload status is abort or fail,\n // it indicates the current update cannot be applied safely,\n // and thus we should bail out to a forced reload for consistency.\n return hasReactRefresh && ['abort', 'fail'].indexOf(status) === -1;\n}\n\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdates(onHotUpdateSuccess) {\n if (!module.hot) {\n // HotModuleReplacementPlugin is not in webpack configuration.\n window.location.reload();\n return;\n }\n\n if (!isUpdateAvailable() || !canApplyUpdates()) {\n return;\n }\n\n function handleApplyUpdates(err, updatedModules) {\n const haveErrors = err || hadRuntimeError;\n // When there is no error but updatedModules is unavailable,\n // it indicates a critical failure in hot-reloading,\n // e.g. server is not ready to serve new bundle,\n // and hence we need to do a forced reload.\n const needsForcedReload = !err && !updatedModules;\n if ((haveErrors && !canAcceptErrors()) || needsForcedReload) {\n window.location.reload();\n return;\n }\n\n if (typeof onHotUpdateSuccess === 'function') {\n // Maybe we want to do something.\n onHotUpdateSuccess();\n }\n\n if (isUpdateAvailable()) {\n // While we were updating, there was a new update! Do it again.\n tryApplyUpdates();\n }\n }\n\n // https://webpack.github.io/docs/hot-module-replacement.html#check\n var result = module.hot.check(/* autoApply */ true, handleApplyUpdates);\n\n // // webpack 2 returns a Promise instead of invoking a callback\n if (result && result.then) {\n result.then(\n function (updatedModules) {\n handleApplyUpdates(null, updatedModules);\n },\n function (err) {\n handleApplyUpdates(err, null);\n }\n );\n }\n}\n"],"mappings":"AAAA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA,a,CAEA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;AAEA,IAAIA,SAAS,GAAGC,OAAO,CAAC,YAAD,CAAvB;;AACA,IAAIC,GAAG,GAAGD,OAAO,CAAC,KAAD,CAAjB;;AACA,IAAIE,oBAAoB,GAAGF,OAAO,CAAC,wBAAD,CAAlC;;AACA,IAAIG,qBAAqB,GAAGH,OAAO,CAAC,yBAAD,CAAnC;;AACA,IAAII,YAAY,GAAGJ,OAAO,CAAC,qBAAD,CAA1B;;AAEAI,YAAY,CAACC,gBAAb,CAA8B,SAASC,aAAT,CAAuBC,aAAvB,EAAsC;EAClE;EACAC,KAAK,CACHN,oBAAoB,GAClB,YADF,GAEEO,MAAM,CAACC,kBAAP,CAA0BH,aAAa,CAACI,QAAxC,CAFF,GAGE,cAHF,GAIEF,MAAM,CAACC,kBAAP,CAA0BH,aAAa,CAACK,UAAd,IAA4B,CAAtD,CAJF,GAKE,aALF,GAMEH,MAAM,CAACC,kBAAP,CAA0BH,aAAa,CAACM,SAAd,IAA2B,CAArD,CAPC,CAAL;AASD,CAXD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,CAE/C;IACA;IACA;IACA;;IACA,MAAMyE,iBAAiB,GAAG,CAACH,GAAD,IAAQ,CAACC,cAAnC;;IACA,IAAKC,UAAU,IAAI,CAACR,eAAe,EAA/B,IAAsCS,iBAA1C,EAA6D;MAC3D9E,MAAM,CAACuB,QAAP,CAAgByC,MAAhB;MACA;IACD;;IAED,IAAI,OAAOxB,kBAAP,KAA8B,UAAlC,EAA8C;MAC5C;MACAA,kBAAkB;IACnB;;IAED,IAAIyB,iBAAiB,EAArB,EAAyB;MACvB;MACA1B,eAAe;IAChB;EACF,CAhC0C,CAkC3C;;;EACA,IAAIwC,MAAM,GAAGtE,MAAM,CAACC,GAAP,CAAWsE,KAAX;EAAiB;EAAgB,IAAjC,EAAuCN,kBAAvC,CAAb,CAnC2C,CAqC3C;;EACA,IAAIK,MAAM,IAAIA,MAAM,CAACE,IAArB,EAA2B;IACzBF,MAAM,CAACE,IAAP,CACE,UAAUL,cAAV,EAA0B;MACxBF,kBAAkB,CAAC,IAAD,EAAOE,cAAP,CAAlB;IACD,CAHH,EAIE,UAAUD,GAAV,EAAe;MACbD,kBAAkB,CAACC,GAAD,EAAM,IAAN,CAAlB;IACD,CANH;EAQD;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["postCssConfig","ident","plugins","require","resolve","autoprefixer","flexbox","stage"],"sources":["postcss.config.ts"],"sourcesContent":["\nexport const postCssConfig = {\n // Necessary for external CSS imports to work\n // https://github.com/facebook/create-react-app/issues/2677\n ident: 'postcss',\n plugins: [\n // eslint-disable-next-line global-require\n require.resolve('postcss-flexbugs-fixes'),\n // eslint-disable-next-line global-require\n require('postcss-preset-env')({\n autoprefixer: {\n flexbox: 'no-2009',\n },\n stage: 3,\n }),\n // Adds PostCSS Normalize as the reset css with default options,\n // so that it honors browserslist config in package.json\n // which in turn let's users customize the target behavior as per their needs.\n require.resolve('postcss-normalize'),\n ],\n};\n"],"mappings":";;;;;;AACO,MAAMA,aAAa,GAAG;EAC3B;EACA;EACAC,KAAK,EAAE,SAHoB;EAI3BC,OAAO,EAAE,CACP;EACAC,OAAO,CAACC,OAAR,CAAgB,wBAAhB,CAFO,EAGP;EACAD,OAAO,CAAC,oBAAD,CAAP,CAA8B;IAC5BE,YAAY,EAAE;MACZC,OAAO,EAAE;IADG,CADc;IAI5BC,KAAK,EAAE;EAJqB,CAA9B,CAJO,EAUP;EACA;EACA;EACAJ,OAAO,CAACC,OAAR,CAAgB,mBAAhB,CAbO;AAJkB,CAAtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack.config.base.ts"],"names":["styleLoaderPath","require","resolve","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","isEnvProduction","isEnvProductionProfile","argv","includes","baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","postCssLoaderPath","postCssConfig","extensions","map","ext","alias","module","strictExportPresence","rules","test","fullySpecified","oneOf","stylesRegexps","cssNoModulesRegex","use","cssLoaderOpts","importLoaders","sourceMap","sideEffects","exclude","options","babelrc","configFile","customize","presets","cacheDirectory","cacheCompression","compact","cssModuleRegex","modules","getLocalIdent","getCSSModuleLocalIdent","sassNoModuleRegex","preProcessOptions","resolveUrlLoaderPath","preProcessorPath","sassModuleRegex","lessNoModuleRegex","lessModuleRegex","type","parser","dataUrlCondition","maxSize","generator","filename","dependency","not","titleProp","ref","plugins","chunkFilename","IgnorePlugin","resourceRegExp","contextRegExp","filter","Boolean","performance"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAA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iB;AACfC,MAAAA,cAAc,EAAE,cADD;AAEfC,MAAAA,aAAa,EAAE;AAFA,KAAjB,CAbO,EAiBPC,MAjBO,CAiBAC,OAjBA,CAxSJ;AA0TL;AACA;AACAC,IAAAA,WAAW,EAAE;AA5TR,GAAP;AA8TD","sourcesContent":["import { merge } from 'lodash';\nimport 'style-loader';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';\nimport { Configuration, IgnorePlugin } from 'webpack';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';\nimport { postCssConfig } from './postcss.config';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n// Make sure the mdx-loader is a dependency\nimport '@teambit/mdx.modules.mdx-loader';\n\nconst styleLoaderPath = require.resolve('style-loader');\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'cjs',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\n 'mdx',\n 'md',\n];\n\n// Source maps are resource heavy and can cause out of memory issue for large source files.\nconst shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';\n\nconst imageInlineSizeLimit = parseInt(process.env.IMAGE_INLINE_SIZE_LIMIT || '10000');\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (isEnvProduction = false): Configuration {\n // Variable used for enabling profiling in Production\n // passed into alias object. Uses a flag if passed into the build command\n const isEnvProductionProfile = process.argv.includes('--profile');\n\n const baseStyleLoadersOptions = {\n injectingLoader: isEnvProduction ? MiniCssExtractPlugin.loader : styleLoaderPath,\n cssLoaderPath: require.resolve('css-loader'),\n postCssLoaderPath: require.resolve('postcss-loader'),\n postCssConfig,\n };\n\n // We will provide `paths.publicUrlOrPath` to our app\n // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.\n // Get environment variables to inject into our app.\n // const env = getClientEnvironment(publicUrlOrPath.slice(0, -1));\n\n return {\n // TODO: make the dev tool according to shouldUseSourceMap and isEnvProduction\n // devtool: 'inline-source-map',\n resolve: {\n // These are the reasonable defaults supported by the Node ecosystem.\n // We also include JSX as a common component filename extension to support\n // some tools, although we do not recommend using it, see:\n // https://github.com/facebook/create-react-app/issues/290\n // `web` extension prefixes have been added for better support\n // for React Native Web.\n extensions: moduleFileExtensions.map((ext) => `.${ext}`),\n\n alias: {\n 'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime.js'),\n 'react/jsx-runtime': require.resolve('react/jsx-runtime.js'),\n // Support React Native Web\n // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/\n // TODO: @uri please remember to remove after publishing evangelist and base-ui\n\n 'react-dom/server': require.resolve('react-dom/server'),\n // Allows for better profiling with ReactDevTools\n ...(isEnvProductionProfile && {\n 'react-dom$': 'react-dom/profiling',\n 'scheduler/tracing': 'scheduler/tracing-profiling',\n }),\n },\n },\n module: {\n strictExportPresence: true,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n // \"oneOf\" will traverse all following loaders until one will\n // match the requirements. When no loader matches it will fall\n // back to the \"file\" loader at the end of the loader list.\n oneOf: [\n // \"postcss\" loader applies autoprefixer to our CSS.\n // \"css\" loader resolves paths in CSS and adds assets as dependencies.\n // \"style\" loader turns CSS into JS modules that inject <style> tags.\n // In production, we use MiniCSSExtractPlugin to extract that CSS\n // to a file, but in development \"style\" loader enables hot editing\n // of CSS.\n // By default we support CSS Modules with the extension .module.css\n {\n test: stylesRegexps.cssNoModulesRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n\n // Process application JS with Babel.\n // The preset includes JSX, Flow, TypeScript, and some ESnext features.\n {\n test: /\\.(js|mjs|jsx|ts|tsx)$/,\n exclude: [/node_modules/, /\\/dist\\//],\n // consider: limit loader to files only in a capsule that has bitid in package.json\n // descriptionData: { componentId: ComponentID.isValidObject },\n // // or\n // include: capsulePaths\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n customize: require.resolve('babel-preset-react-app/webpack-overrides'),\n presets: [require.resolve('@babel/preset-react')],\n // This is a feature of `babel-loader` for webpack (not Babel itself).\n // It enables caching results in ./node_modules/.cache/babel-loader/\n // directory for faster rebuilds.\n cacheDirectory: true,\n // See #6846 for context on why cacheCompression is disabled\n cacheCompression: false,\n compact: isEnvProduction,\n },\n },\n // Process any JS outside of the app with Babel.\n // Unlike the application JS, we only compile the standard ES features.\n // Probably not needed in our use case\n // {\n // test: /\\.(js|mjs)$/,\n // exclude: /@babel(?:\\/|\\\\{1,2})runtime/,\n // loader: require.resolve('babel-loader'),\n // options: {\n // babelrc: false,\n // configFile: false,\n // compact: false,\n // presets: [[require.resolve('babel-preset-react-app/dependencies'), { helpers: true }]],\n // cacheDirectory: true,\n // // See #6846 for context on why cacheCompression is disabled\n // cacheCompression: false,\n\n // // Babel sourcemaps are needed for debugging into node_modules\n // // code. Without the options below, debuggers like VSCode\n // // show incorrect code and set breakpoints on the wrong lines.\n // sourceMaps: shouldUseSourceMap,\n // inputSourceMap: shouldUseSourceMap,\n // },\n // },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n exclude: [/node_modules/],\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-react'), require.resolve('@babel/preset-env')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n // Adds support for CSS Modules (https://github.com/css-modules/css-modules)\n // using the extension .module.css\n {\n test: stylesRegexps.cssModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n })\n ),\n },\n // Opt-in support for SASS (using .scss or .sass extensions).\n // By default we support SASS Modules with the\n // extensions .module.scss or .module.sass\n {\n test: stylesRegexps.sassNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n // Adds support for CSS Modules, but using SASS\n // using the extension .module.scss or .module.sass\n {\n test: stylesRegexps.sassModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n },\n {\n test: stylesRegexps.lessNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n {\n test: stylesRegexps.lessModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n },\n {\n test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/],\n type: 'asset',\n parser: {\n dataUrlCondition: {\n maxSize: imageInlineSizeLimit,\n },\n },\n generator: {\n filename: 'static/images/[hash][ext][query]',\n },\n },\n {\n // loads svg as both inlineUrl and react component, like:\n // import starUrl, { ReactComponent as StarIcon } from './star.svg';\n // (remove when there is native support for both opitons from webpack5 / svgr)\n test: /\\.svg$/,\n oneOf: [\n {\n dependency: { not: ['url'] }, // exclude new URL calls\n use: [\n {\n loader: require.resolve('@svgr/webpack'),\n options: { titleProp: true, ref: true },\n },\n require.resolve('new-url-loader'),\n ],\n },\n {\n type: 'asset', // export a data URI or emit a separate file\n },\n ],\n },\n {\n test: /\\.(woff(2)?|ttf|eot|svg)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n type: 'asset',\n generator: {\n filename: 'static/fonts/[hash][ext][query]',\n },\n },\n\n // \"file\" loader makes sure those assets get served by WebpackDevServer.\n // When you `import` an asset, you get its (virtual) filename.\n // In production, they would get copied to the `build` folder.\n // This loader doesn't use a \"test\" so it will catch all modules\n // that fall through the other loaders.\n {\n // Exclude `js` files to keep \"css\" loader working as it injects\n // its runtime that would otherwise be processed through \"file\" loader.\n // Also exclude `html` and `json` extensions so they get processed\n // by webpacks internal loaders.\n exclude: [/\\.(js|mjs|cjs|jsx|ts|tsx)$/, /\\.html$/, /\\.mdx?/, /\\.json$/, /\\.css$/],\n generator: {\n filename: 'static/[hash][ext][query]',\n },\n type: 'asset',\n },\n // ** STOP ** Are you adding a new loader?\n // Make sure to add the new loader(s) before the \"type:asset\" loader.\n ],\n },\n ],\n },\n // @ts-ignore\n plugins: [\n isEnvProduction &&\n new MiniCssExtractPlugin({\n // Options similar to the same options in webpackOptions.output\n // both options are optional\n filename: 'static/css/[name].[contenthash:8].css',\n chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',\n }),\n // Moment.js is an extremely popular library that bundles large locale files\n // by default due to how webpack interprets its code. This is a practical\n // solution that requires the user to opt into importing specific locales.\n // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n // You can remove this if you don't use Moment.js:\n new IgnorePlugin({\n resourceRegExp: /^\\.\\/locale$/,\n contextRegExp: /moment$/,\n }),\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"names":["styleLoaderPath","require","resolve","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","isEnvProduction","isEnvProductionProfile","argv","includes","baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","postCssLoaderPath","postCssConfig","extensions","map","ext","alias","module","strictExportPresence","rules","test","fullySpecified","oneOf","stylesRegexps","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","exclude","options","babelrc","configFile","customize","presets","cacheDirectory","cacheCompression","compact","cssModuleRegex","modules","getLocalIdent","getCSSModuleLocalIdent","sassNoModuleRegex","preProcessOptions","resolveUrlLoaderPath","preProcessorPath","sassModuleRegex","lessNoModuleRegex","lessModuleRegex","type","parser","dataUrlCondition","maxSize","generator","filename","dependency","not","titleProp","ref","plugins","chunkFilename","IgnorePlugin","resourceRegExp","contextRegExp","filter","Boolean","performance"],"sources":["webpack.config.base.ts"],"sourcesContent":["import { merge } from 'lodash';\nimport 'style-loader';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';\nimport { Configuration, IgnorePlugin } from 'webpack';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';\nimport { postCssConfig } from './postcss.config';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n// Make sure the mdx-loader is a dependency\nimport '@teambit/mdx.modules.mdx-loader';\n\nconst styleLoaderPath = require.resolve('style-loader');\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'cjs',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\n 'mdx',\n 'md',\n];\n\n// Source maps are resource heavy and can cause out of memory issue for large source files.\nconst shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';\n\nconst imageInlineSizeLimit = parseInt(process.env.IMAGE_INLINE_SIZE_LIMIT || '10000');\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (isEnvProduction = false): Configuration {\n // Variable used for enabling profiling in Production\n // passed into alias object. Uses a flag if passed into the build command\n const isEnvProductionProfile = process.argv.includes('--profile');\n\n const baseStyleLoadersOptions = {\n injectingLoader: isEnvProduction ? MiniCssExtractPlugin.loader : styleLoaderPath,\n cssLoaderPath: require.resolve('css-loader'),\n postCssLoaderPath: require.resolve('postcss-loader'),\n postCssConfig,\n };\n\n // We will provide `paths.publicUrlOrPath` to our app\n // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.\n // Get environment variables to inject into our app.\n // const env = getClientEnvironment(publicUrlOrPath.slice(0, -1));\n\n return {\n // TODO: make the dev tool according to shouldUseSourceMap and isEnvProduction\n // devtool: 'inline-source-map',\n resolve: {\n // These are the reasonable defaults supported by the Node ecosystem.\n // We also include JSX as a common component filename extension to support\n // some tools, although we do not recommend using it, see:\n // https://github.com/facebook/create-react-app/issues/290\n // `web` extension prefixes have been added for better support\n // for React Native Web.\n extensions: moduleFileExtensions.map((ext) => `.${ext}`),\n\n alias: {\n 'react/jsx-dev-runtime': require.resolve('react/jsx-dev-runtime.js'),\n 'react/jsx-runtime': require.resolve('react/jsx-runtime.js'),\n // Support React Native Web\n // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/\n // TODO: @uri please remember to remove after publishing evangelist and base-ui\n\n 'react-dom/server': require.resolve('react-dom/server'),\n // Allows for better profiling with ReactDevTools\n ...(isEnvProductionProfile && {\n 'react-dom$': 'react-dom/profiling',\n 'scheduler/tracing': 'scheduler/tracing-profiling',\n }),\n },\n },\n module: {\n strictExportPresence: true,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n // \"oneOf\" will traverse all following loaders until one will\n // match the requirements. When no loader matches it will fall\n // back to the \"file\" loader at the end of the loader list.\n oneOf: [\n // \"postcss\" loader applies autoprefixer to our CSS.\n // \"css\" loader resolves paths in CSS and adds assets as dependencies.\n // \"style\" loader turns CSS into JS modules that inject <style> tags.\n // In production, we use MiniCSSExtractPlugin to extract that CSS\n // to a file, but in development \"style\" loader enables hot editing\n // of CSS.\n // By default we support CSS Modules with the extension .module.css\n {\n test: stylesRegexps.cssNoModulesRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n\n // Process application JS with Babel.\n // The preset includes JSX, Flow, TypeScript, and some ESnext features.\n {\n test: /\\.(js|mjs|jsx|ts|tsx)$/,\n exclude: [/node_modules/, /\\/dist\\//],\n // consider: limit loader to files only in a capsule that has bitid in package.json\n // descriptionData: { componentId: ComponentID.isValidObject },\n // // or\n // include: capsulePaths\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n customize: require.resolve('babel-preset-react-app/webpack-overrides'),\n presets: [require.resolve('@babel/preset-react')],\n // This is a feature of `babel-loader` for webpack (not Babel itself).\n // It enables caching results in ./node_modules/.cache/babel-loader/\n // directory for faster rebuilds.\n cacheDirectory: true,\n // See #6846 for context on why cacheCompression is disabled\n cacheCompression: false,\n compact: isEnvProduction,\n },\n },\n // Process any JS outside of the app with Babel.\n // Unlike the application JS, we only compile the standard ES features.\n // Probably not needed in our use case\n // {\n // test: /\\.(js|mjs)$/,\n // exclude: /@babel(?:\\/|\\\\{1,2})runtime/,\n // loader: require.resolve('babel-loader'),\n // options: {\n // babelrc: false,\n // configFile: false,\n // compact: false,\n // presets: [[require.resolve('babel-preset-react-app/dependencies'), { helpers: true }]],\n // cacheDirectory: true,\n // // See #6846 for context on why cacheCompression is disabled\n // cacheCompression: false,\n\n // // Babel sourcemaps are needed for debugging into node_modules\n // // code. Without the options below, debuggers like VSCode\n // // show incorrect code and set breakpoints on the wrong lines.\n // sourceMaps: shouldUseSourceMap,\n // inputSourceMap: shouldUseSourceMap,\n // },\n // },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n exclude: [/node_modules/],\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-react'), require.resolve('@babel/preset-env')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n // Adds support for CSS Modules (https://github.com/css-modules/css-modules)\n // using the extension .module.css\n {\n test: stylesRegexps.cssModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n })\n ),\n },\n // Opt-in support for SASS (using .scss or .sass extensions).\n // By default we support SASS Modules with the\n // extensions .module.scss or .module.sass\n {\n test: stylesRegexps.sassNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n // Adds support for CSS Modules, but using SASS\n // using the extension .module.scss or .module.sass\n {\n test: stylesRegexps.sassModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 3,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('sass-loader'),\n },\n })\n ),\n },\n {\n test: stylesRegexps.lessNoModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n // Don't consider CSS imports dead code even if the\n // containing package claims to have no side effects.\n // Remove this when webpack adds a warning or an error for this.\n // See https://github.com/webpack/webpack/issues/6571\n sideEffects: true,\n },\n {\n test: stylesRegexps.lessModuleRegex,\n use: generateStyleLoaders(\n merge({}, baseStyleLoadersOptions, {\n cssLoaderOpts: {\n importLoaders: 1,\n sourceMap: isEnvProduction || shouldUseSourceMap,\n modules: {\n getLocalIdent: getCSSModuleLocalIdent,\n },\n },\n shouldUseSourceMap: isEnvProduction || shouldUseSourceMap,\n preProcessOptions: {\n resolveUrlLoaderPath: require.resolve('resolve-url-loader'),\n preProcessorPath: require.resolve('less-loader'),\n },\n })\n ),\n },\n {\n test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/],\n type: 'asset',\n parser: {\n dataUrlCondition: {\n maxSize: imageInlineSizeLimit,\n },\n },\n generator: {\n filename: 'static/images/[hash][ext][query]',\n },\n },\n {\n // loads svg as both inlineUrl and react component, like:\n // import starUrl, { ReactComponent as StarIcon } from './star.svg';\n // (remove when there is native support for both opitons from webpack5 / svgr)\n test: /\\.svg$/,\n oneOf: [\n {\n dependency: { not: ['url'] }, // exclude new URL calls\n use: [\n {\n loader: require.resolve('@svgr/webpack'),\n options: { titleProp: true, ref: true },\n },\n require.resolve('new-url-loader'),\n ],\n },\n {\n type: 'asset', // export a data URI or emit a separate file\n },\n ],\n },\n {\n test: /\\.(woff(2)?|ttf|eot|svg)(\\?v=\\d+\\.\\d+\\.\\d+)?$/,\n type: 'asset',\n generator: {\n filename: 'static/fonts/[hash][ext][query]',\n },\n },\n\n // \"file\" loader makes sure those assets get served by WebpackDevServer.\n // When you `import` an asset, you get its (virtual) filename.\n // In production, they would get copied to the `build` folder.\n // This loader doesn't use a \"test\" so it will catch all modules\n // that fall through the other loaders.\n {\n // Exclude `js` files to keep \"css\" loader working as it injects\n // its runtime that would otherwise be processed through \"file\" loader.\n // Also exclude `html` and `json` extensions so they get processed\n // by webpacks internal loaders.\n exclude: [/\\.(js|mjs|cjs|jsx|ts|tsx)$/, /\\.html$/, /\\.mdx?/, /\\.json$/, /\\.css$/],\n generator: {\n filename: 'static/[hash][ext][query]',\n },\n type: 'asset',\n },\n // ** STOP ** Are you adding a new loader?\n // Make sure to add the new loader(s) before the \"type:asset\" loader.\n ],\n },\n ],\n },\n // @ts-ignore\n plugins: [\n isEnvProduction &&\n new MiniCssExtractPlugin({\n // Options similar to the same options in webpackOptions.output\n // both options are optional\n filename: 'static/css/[name].[contenthash:8].css',\n chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',\n }),\n // Moment.js is an extremely popular library that bundles large locale files\n // by default due to how webpack interprets its code. This is a practical\n // solution that requires the user to opt into importing specific locales.\n // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n // You can remove this if you don't use Moment.js:\n new IgnorePlugin({\n resourceRegExp: /^\\.\\/locale$/,\n contextRegExp: /moment$/,\n }),\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA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AAI,EAAE,OAFR;UAGEI,SAAS,EAAE;YACTC,QAAQ,EAAE;UADD;QAHb,CAjOK,EAyOL;QACA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACAzB,OAAO,EAAE,CAAC,4BAAD,EAA+B,SAA/B,EAA0C,QAA1C,EAAoD,SAApD,EAA+D,QAA/D,CALX;UAMEwB,SAAS,EAAE;YACTC,QAAQ,EAAE;UADD,CANb;UASEL,IAAI,EAAE;QATR,CA9OK,CAyPL;QACA;QA1PK;MAJT,CAPK;IAFD,CA3BH;IAuSL;IACAU,OAAO,EAAE,CACP5D,eAAe,IACb,KAAIM,+BAAJ,EAAyB;MACvB;MACA;MACAiD,QAAQ,EAAE,uCAHa;MAIvBM,aAAa,EAAE;IAJQ,CAAzB,CAFK,EAQP;IACA;IACA;IACA;IACA;IACA,KAAIC,uBAAJ,EAAiB;MACfC,cAAc,EAAE,cADD;MAEfC,aAAa,EAAE;IAFA,CAAjB,CAbO,EAiBPC,MAjBO,CAiBAC,OAjBA,CAxSJ;IA0TL;IACA;IACAC,WAAW,EAAE;EA5TR,CAAP;AA8TD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Configuration } from 'webpack';
|
|
2
|
-
export default function (
|
|
2
|
+
export default function (dev?: boolean): Configuration;
|
|
@@ -41,22 +41,11 @@ function _terserWebpackPlugin() {
|
|
|
41
41
|
return data;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function _getExternals() {
|
|
45
|
-
const data = require("./get-externals");
|
|
46
|
-
|
|
47
|
-
_getExternals = function () {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
44
|
// import { WebpackManifestPlugin } from 'webpack-manifest-plugin';
|
|
55
45
|
// This is the production and development configuration.
|
|
56
46
|
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
|
|
57
47
|
// eslint-disable-next-line complexity
|
|
58
|
-
function _default(
|
|
59
|
-
const externals = externalizePeer ? (0, _getExternals().getExternals)(peers) : undefined;
|
|
48
|
+
function _default(dev) {
|
|
60
49
|
const optimization = dev ? undefined : {
|
|
61
50
|
minimize: true,
|
|
62
51
|
minimizer: [new (_terserWebpackPlugin().default)({
|
|
@@ -135,7 +124,6 @@ function _default(externalizePeer, peers, dev) {
|
|
|
135
124
|
|
|
136
125
|
};
|
|
137
126
|
return {
|
|
138
|
-
externals,
|
|
139
127
|
optimization,
|
|
140
128
|
plugins: [// Generate an asset manifest file with the following content:
|
|
141
129
|
// - "files" key: Mapping of all asset filenames to their corresponding
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["dev","optimization","undefined","minimize","minimizer","TerserPlugin","minify","esbuildMinify","terserOptions","minifyWhitespace","minifyIdentifiers","minifySyntax","CssMinimizerPlugin","minimizerOptions","preset","minifyFontValues","removeQuotes","plugins","WorkboxWebpackPlugin","GenerateSW","clientsClaim","exclude","navigateFallback","navigateFallbackDenylist","RegExp","filter","Boolean","performance"],"sources":["webpack.config.base.prod.ts"],"sourcesContent":["import WorkboxWebpackPlugin from 'workbox-webpack-plugin';\nimport CssMinimizerPlugin from 'css-minimizer-webpack-plugin';\nimport TerserPlugin from 'terser-webpack-plugin';\nimport { Configuration } from 'webpack';\n// import { WebpackManifestPlugin } from 'webpack-manifest-plugin';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (dev?: boolean): Configuration {\n const optimization = dev\n ? undefined\n : {\n minimize: true,\n minimizer: [\n new TerserPlugin({\n minify: TerserPlugin.esbuildMinify,\n // `terserOptions` options will be passed to `esbuild`\n // Link to options - https://esbuild.github.io/api/#minify\n // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use:\n terserOptions: {\n minify: false,\n minifyWhitespace: true,\n // We don't want to minify identifiers to enable easier debugging on remote scopes when there are preview issues\n minifyIdentifiers: false,\n // minifyIdentifiers: true,\n minifySyntax: true,\n },\n // terserOptions: {},\n }),\n\n // This is only used in production mode\n // new TerserPlugin({\n // extractComments: false,\n // terserOptions: {\n // parse: {\n // // We want terser to parse ecma 8 code. However, we don't want it\n // // to apply any minification steps that turns valid ecma 5 code\n // // into invalid ecma 5 code. This is why the 'compress' and 'output'\n // // sections only apply transformations that are ecma 5 safe\n // // https://github.com/facebook/create-react-app/pull/4234\n // ecma: 8,\n // },\n // compress: {\n // ecma: 5,\n // warnings: false,\n // // Disabled because of an issue with Uglify breaking seemingly valid code:\n // // https://github.com/facebook/create-react-app/issues/2376\n // // Pending further investigation:\n // // https://github.com/mishoo/UglifyJS2/issues/2011\n // comparisons: false,\n // // Disabled because of an issue with Terser breaking valid code:\n // // https://github.com/facebook/create-react-app/issues/5250\n // // Pending further investigation:\n // // https://github.com/terser-js/terser/issues/120\n // inline: 2,\n // },\n // mangle: {\n // safari10: true,\n // },\n // output: {\n // ecma: 5,\n // comments: false,\n // // Turned on because emoji and regex is not minified properly using default\n // // https://github.com/facebook/create-react-app/issues/2488\n // ascii_only: true,\n // },\n // },\n // }),\n new CssMinimizerPlugin({\n minimizerOptions: {\n preset: [\n 'default',\n {\n minifyFontValues: { removeQuotes: false },\n },\n ],\n },\n }),\n ],\n // Automatically split vendor and commons\n // https://twitter.com/wSokra/status/969633336732905474\n // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366\n // splitChunks: {\n // chunks: 'all',\n // name: false,\n // },\n // Keep the runtime chunk separated to enable long term caching\n // https://twitter.com/wSokra/status/969679223278505985\n // https://github.com/facebook/create-react-app/issues/5358\n // runtimeChunk: {\n // name: (entrypoint) => `runtime-${entrypoint.name}`,\n // },\n };\n\n return {\n optimization,\n\n plugins: [\n // Generate an asset manifest file with the following content:\n // - \"files\" key: Mapping of all asset filenames to their corresponding\n // output file so that tools can pick it up without having to parse\n // `index.html`\n // can be used to reconstruct the HTML if necessary\n // new WebpackManifestPlugin({\n // fileName: 'asset-manifest.json',\n // publicPath: 'public',\n // generate: (seed, files, entrypoints) => {\n // const manifestFiles = files.reduce((manifest, file) => {\n // manifest[file.name] = file.path;\n // return manifest;\n // }, seed);\n // const entrypointFiles = entrypoints.main.filter((fileName) => !fileName.endsWith('.map'));\n\n // // @ts-ignore - https://github.com/shellscape/webpack-manifest-plugin/issues/276\n // return {\n // files: manifestFiles,\n // entrypoints: entrypointFiles,\n // } as Record<string, string>;\n // },\n // }),\n // Generate a service worker script that will precache, and keep up to date,\n // the HTML & assets that are part of the webpack build.\n new WorkboxWebpackPlugin.GenerateSW({\n clientsClaim: true,\n exclude: [/\\.map$/, /asset-manifest\\.json$/],\n // importWorkboxFrom: 'cdn',\n navigateFallback: 'public/index.html',\n navigateFallbackDenylist: [\n // Exclude URLs starting with /_, as they're likely an API call\n new RegExp('^/_'),\n // Exclude any URLs whose last part seems to be a file extension\n // as they're likely a resource and not a SPA route.\n // URLs containing a \"?\" character won't be blacklisted as they're likely\n // a route with query params (e.g. auth callbacks).\n new RegExp('/[^/?]+\\\\.[^/]+$'),\n ],\n }),\n ].filter(Boolean),\n // Turn off performance processing because we utilize\n // our own hints via the FileSizeReporter\n performance: false,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;AAEA;AACA;AACA;AACe,kBAAUA,GAAV,EAAwC;EACrD,MAAMC,YAAY,GAAGD,GAAG,GACpBE,SADoB,GAEpB;IACEC,QAAQ,EAAE,IADZ;IAEEC,SAAS,EAAE,CACT,KAAIC,8BAAJ,EAAiB;MACfC,MAAM,EAAED,8BAAA,CAAaE,aADN;MAEf;MACA;MACA;MACAC,aAAa,EAAE;QACbF,MAAM,EAAE,KADK;QAEbG,gBAAgB,EAAE,IAFL;QAGb;QACAC,iBAAiB,EAAE,KAJN;QAKb;QACAC,YAAY,EAAE;MAND,CALA,CAaf;;IAbe,CAAjB,CADS,EAiBT;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,KAAIC,oCAAJ,EAAuB;MACrBC,gBAAgB,EAAE;QAChBC,MAAM,EAAE,CACN,SADM,EAEN;UACEC,gBAAgB,EAAE;YAAEC,YAAY,EAAE;UAAhB;QADpB,CAFM;MADQ;IADG,CAAvB,CAvDS,CAFb,CAoEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAhFF,CAFJ;EAqFA,OAAO;IACLf,YADK;IAGLgB,OAAO,EAAE,CACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,KAAIC,+BAAA,CAAqBC,UAAzB,EAAoC;MAClCC,YAAY,EAAE,IADoB;MAElCC,OAAO,EAAE,CAAC,QAAD,EAAW,uBAAX,CAFyB;MAGlC;MACAC,gBAAgB,EAAE,mBAJgB;MAKlCC,wBAAwB,EAAE,CACxB;MACA,IAAIC,MAAJ,CAAW,KAAX,CAFwB,EAGxB;MACA;MACA;MACA;MACA,IAAIA,MAAJ,CAAW,kBAAX,CAPwB;IALQ,CAApC,CAzBO,EAwCPC,MAxCO,CAwCAC,OAxCA,CAHJ;IA4CL;IACA;IACAC,WAAW,EAAE;EA9CR,CAAP;AAgDD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["matchNothingRegex","workDir","envId","module","rules","test","enforce","include","path","join","descriptionData","componentId","value","use","require","resolve","ComponentID","isValidObject","loader","options","babelrc","configFile","plugins","compact","minified","presets","ReactRefreshWebpackPlugin","overlay","sockPath","entry"],"sources":["webpack.config.component.dev.ts"],"sourcesContent":["import path from 'path';\nimport { Configuration } from 'webpack';\nimport { ComponentID } from '@teambit/component-id';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\nimport ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';\n\nconst matchNothingRegex = 'a^';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\n// export default function (workDir: string, envId: string): Configuration {\nexport default function (workDir: string, envId: string): Configuration {\n return {\n module: {\n rules: [\n {\n test: /\\.js$/,\n enforce: 'pre',\n // limit loader to files in the current project,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: (value) => !!value },\n use: [require.resolve('source-map-loader')],\n },\n {\n test: /\\.js$/,\n // limit loader to files in the current project,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: ComponentID.isValidObject },\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n plugins: [\n require.resolve('react-refresh/babel'),\n // for component highlighting in preview.\n [require.resolve('@teambit/react.babel.bit-react-transformer')],\n ],\n // turn off all optimizations (only slow down for node_modules)\n compact: false,\n minified: false,\n },\n },\n ],\n },\n // MDX support (move to the mdx aspect and extend from there)\n {\n test: /\\.mdx?$/,\n // to skip any files linked from other projects (like Bit itself)\n include: path.join(workDir, 'node_modules'),\n // only apply to packages with componentId in their package.json (ie. bit components)\n descriptionData: { componentId: (value) => !!value },\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n presets: [require.resolve('@babel/preset-react'), require.resolve('@babel/preset-env')],\n plugins: [require.resolve('react-refresh/babel')],\n },\n },\n {\n loader: require.resolve('@teambit/mdx.modules.mdx-loader'),\n },\n ],\n },\n ],\n },\n plugins: [\n // No need here as we have `hot: true` in the dev server\n // new webpack.HotModuleReplacementPlugin({}),\n new ReactRefreshWebpackPlugin({\n overlay: {\n sockPath: `_hmr/${envId}`,\n // TODO - react-error-overlay not showing runtime errors - https://github.com/teambit/bit/issues/5452\n entry: require.resolve('./overlay/webpackHotDevClient'),\n module: require.resolve('./overlay/refreshOverlayInterop'),\n },\n\n // we use '@pmmmwh/react-refresh-webpack-plugin/loader' directly where relevant.\n // FYI, original defaults of the plugin are:\n // include: /\\.([cm]js|[jt]sx?|flow)$/i, exclude: /node_modules/,\n include: matchNothingRegex,\n }),\n ],\n };\n}\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAHA;AACA;AAIA,MAAMA,iBAAiB,GAAG,IAA1B,C,CAEA;AACA;AACA;AACA;;AACe,kBAAUC,OAAV,EAA2BC,KAA3B,EAAyD;EACtE,OAAO;IACLC,MAAM,EAAE;MACNC,KAAK,EAAE,CACL;QACEC,IAAI,EAAE,OADR;QAEEC,OAAO,EAAE,KAFX;QAGE;QACA;QACAC,OAAO,EAAEC,eAAA,CAAKC,IAAL,CAAUR,OAAV,EAAmB,cAAnB,CALX;QAME;QACAS,eAAe,EAAE;UAAEC,WAAW,EAAGC,KAAD,IAAW,CAAC,CAACA;QAA5B,CAPnB;QAQEC,GAAG,EAAE,CAACC,OAAO,CAACC,OAAR,CAAgB,mBAAhB,CAAD;MARP,CADK,EAWL;QACEV,IAAI,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V,CAXG;MANP,CAtCK;IADD,CADH;IAgELO,OAAO,EAAE,CACP;IACA;IACA,KAAII,oCAAJ,EAA8B;MAC5BC,OAAO,EAAE;QACPC,QAAQ,EAAG,QAAO1B,KAAM,EADjB;QAEP;QACA2B,KAAK,EAAEf,OAAO,CAACC,OAAR,CAAgB,+BAAhB,CAHA;QAIPZ,MAAM,EAAEW,OAAO,CAACC,OAAR,CAAgB,iCAAhB;MAJD,CADmB;MAQ5B;MACA;MACA;MACAR,OAAO,EAAEP;IAXmB,CAA9B,CAHO;EAhEJ,CAAP;AAkFD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["module","rules","test","include","exclude","descriptionData","componentId","ComponentID","isValidObject","use","loader","require","resolve","options","babelrc","configFile","plugins","compact","minified"],"sources":["webpack.config.component.prod.ts"],"sourcesContent":["import { Configuration } from 'webpack';\nimport { ComponentID } from '@teambit/component-id';\n// Make sure the bit-react-transformer is a dependency\n// TODO: remove it once we can set policy from component to component then set it via the component.json\nimport '@teambit/react.babel.bit-react-transformer';\n\n// This is the production and development configuration.\n// It is focused on developer experience, fast rebuilds, and a minimal bundle.\n// eslint-disable-next-line complexity\nexport default function (): Configuration {\n return {\n module: {\n rules: [\n {\n test: /\\.js$/,\n include: [/node_modules/, /\\/dist\\//],\n exclude: /@teambit\\/legacy/,\n descriptionData: { componentId: ComponentID.isValidObject },\n use: [\n {\n loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n plugins: [\n // for component highlighting in preview.\n [require.resolve('@teambit/react.babel.bit-react-transformer')],\n ],\n // turn off all optimizations (only slow down for node_modules)\n compact: false,\n minified: false,\n },\n },\n ],\n },\n ],\n },\n };\n}\n"],"mappings":";;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;;AAFA;AACA;AAGA;AACA;AACA;AACe,oBAA2B;EACxC,OAAO;IACLA,MAAM,EAAE;MACNC,KAAK,EAAE,CACL;QACEC,IAAI,EAAE,OADR;QAEEC,OAAO,EAAE,CAAC,cAAD,EAAiB,UAAjB,CAFX;QAGEC,OAAO,EAAE,kBAHX;QAIEC,eAAe,EAAE;UAAEC,WAAW,EAAEC,0BAAA,CAAYC;QAA3B,CAJnB;QAKEC,GAAG,EAAE,CACH;UACEC,MAAM,EAAEC,OAAO,CAACC,OAAR,CAAgB,cAAhB,CADV;UAEEC,OAAO,EAAE;YACPC,OAAO,EAAE,KADF;YAEPC,UAAU,EAAE,KAFL;YAGPC,OAAO,EAAE,CACP;YACA,CAACL,OAAO,CAACC,OAAR,CAAgB,4CAAhB,CAAD,CAFO,CAHF;YAOP;YACAK,OAAO,EAAE,KARF;YASPC,QAAQ,EAAE;UATH;QAFX,CADG;MALP,CADK;IADD;EADH,CAAP;AA4BD"}
|