@teambit/ui 0.0.969 → 0.0.971
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/dist/{preview-1674750057898.js → preview-1675083688288.js} +2 -2
- package/dist/webpack/webpack.base.config.js +6 -0
- package/dist/webpack/webpack.base.config.js.map +1 -1
- package/dist/webpack/webpack.dev.config.js +6 -0
- package/dist/webpack/webpack.dev.config.js.map +1 -1
- package/package-tar/teambit-ui-0.0.971.tgz +0 -0
- package/package.json +15 -15
- package/webpack/webpack.base.config.ts +7 -0
- package/webpack/webpack.dev.config.ts +7 -0
- package/package-tar/teambit-ui-0.0.969.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@0.0.971/dist/ui.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_ui@0.0.971/dist/ui.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -225,6 +225,12 @@ function createWebpackConfig(workspaceDir, entryFiles, publicDir = 'public') {
|
|
|
225
225
|
maxSize: imageInlineSizeLimit
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
+
}, {
|
|
229
|
+
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
|
230
|
+
type: 'asset',
|
|
231
|
+
generator: {
|
|
232
|
+
filename: 'static/fonts/[hash][ext][query]'
|
|
233
|
+
}
|
|
228
234
|
},
|
|
229
235
|
// Process application JS with Babel.
|
|
230
236
|
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","require","resolve","postCssLoaderPath","postCssConfig","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","isEnvProduction","createWebpackConfig","workspaceDir","entryFiles","publicDir","isEnvProductionProfile","argv","includes","stats","children","errorDetails","mode","entry","main","output","path","join","filename","chunkFilename","extensions","map","ext","alias","react","fallback","module","fallbacks","dgram","dns","fs","stream","http2","net","tls","child_process","strictExportPresence","rules","test","fullySpecified","oneOf","stylesRegexps","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","type","parser","dataUrlCondition","maxSize","options","babelrc","configFile","customize","cacheDirectory","cacheCompression","compact","cssModuleRegex","modules","getLocalIdent","getCSSModuleLocalIdent","sassNoModuleRegex","preProcessOptions","resolveUrlLoaderPath","preProcessorPath","sassModuleRegex","lessNoModuleRegex","lessModuleRegex","exclude","plugins","WebpackManifestPlugin","fileName","generate","seed","files","entrypoints","manifestFiles","reduce","manifest","file","name","entrypointFiles","filter","endsWith","webpack","IgnorePlugin","resourceRegExp","contextRegExp","WorkboxWebpackPlugin","GenerateSW","clientsClaim","maximumFileSizeToCacheInBytes","navigateFallback","navigateFallbackDenylist","RegExp","Boolean","performance"],"sources":["webpack.base.config.ts"],"sourcesContent":["import { merge } from 'lodash';\nimport webpack, { Configuration } from 'webpack';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport { WebpackManifestPlugin } from 'webpack-manifest-plugin';\nimport WorkboxWebpackPlugin from 'workbox-webpack-plugin';\nimport getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';\nimport path from 'path';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';\nimport { fallbacks } from '@teambit/webpack';\nimport { postCssConfig } from './postcss.config';\n\nconst baseStyleLoadersOptions = {\n injectingLoader: MiniCssExtractPlugin.loader,\n cssLoaderPath: require.resolve('css-loader'),\n postCssLoaderPath: require.resolve('postcss-loader'),\n postCssConfig,\n};\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\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\nconst isEnvProduction = true;\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 createWebpackConfig(\n workspaceDir: string,\n entryFiles: string[],\n publicDir = 'public'\n): 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 // 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 stats: {\n children: true,\n errorDetails: true,\n },\n mode: 'production',\n entry: {\n main: entryFiles,\n },\n\n output: {\n // The build folder.\n path: path.join(workspaceDir, publicDir), // default value\n\n filename: 'static/js/[name].[contenthash:8].js',\n // TODO: remove this when upgrading to webpack 5\n // futureEmitAssets: true,\n // There are also additional JS chunk files if you use code splitting.\n chunkFilename: 'static/js/[name].[contenthash:8].chunk.js',\n // this defaults to 'window', but by setting it to 'this' then\n // module chunks which are built will work in web workers as well.\n // Commented out to use the default (self) as according to tobias with webpack5 self is working with workers as well\n // globalObject: 'this',\n },\n\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 // TODO: @uri please remember to remove after publishing evangelist and base-ui\n react: require.resolve('react'),\n 'react-dom/server': require.resolve('react-dom/server'),\n 'react-dom': require.resolve('react-dom'),\n // Allows for better profiling with ReactDevTools\n ...(isEnvProductionProfile && {\n 'react-dom$': 'react-dom/profiling',\n 'scheduler/tracing': 'scheduler/tracing-profiling',\n }),\n },\n fallback: {\n module: false,\n path: fallbacks.path,\n dgram: false,\n dns: false,\n fs: false,\n stream: false,\n http2: false,\n net: false,\n tls: false,\n child_process: false,\n process: fallbacks.process,\n },\n },\n module: {\n strictExportPresence: true,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n // Disable require.ensure as it's not a standard language feature.\n // { parser: { requireEnsure: false } },\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 // \"url\" loader works like \"file\" loader except that it embeds assets\n // smaller than specified limit in bytes as data URLs to avoid requests.\n // A missing `test` is equivalent to a match.\n {\n test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/, /\\.svg$/],\n type: 'asset',\n parser: {\n dataUrlCondition: {\n maxSize: imageInlineSizeLimit,\n },\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 loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n customize: require.resolve('babel-preset-react-app/webpack-overrides'),\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\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 // \"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|jsx|ts|tsx)$/, /\\.html$/, /\\.json$/, /\\.css$/],\n type: 'asset/resource',\n },\n // ** STOP ** Are you adding a new loader?\n // Make sure to add the new loader(s) before the \"file\" loader.\n ],\n },\n ],\n },\n plugins: [\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 // 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 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 // 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 webpack.IgnorePlugin({\n resourceRegExp: /^\\.\\/locale$/,\n contextRegExp: /moment$/,\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 isEnvProduction &&\n new WorkboxWebpackPlugin.GenerateSW({\n clientsClaim: true,\n maximumFileSizeToCacheInBytes: 5000000,\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 // Some libraries import Node modules but don't use them in the browser.\n // Tell webpack to provide empty mocks for them so importing them works.\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;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;EAA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AK,CAACG,MAAM,CAAC,CAACC,QAAQ,EAAEC,IAAI,KAAK;UACrDD,QAAQ,CAACC,IAAI,CAACC,IAAI,CAAC,GAAGD,IAAI,CAACnE,IAAI;UAC/B,OAAOkE,QAAQ;QACjB,CAAC,EAAEL,IAAI,CAAC;QACR,MAAMQ,eAAe,GAAGN,WAAW,CAACjE,IAAI,CAACwE,MAAM,CAAEX,QAAQ,IAAK,CAACA,QAAQ,CAACY,QAAQ,CAAC,MAAM,CAAC,CAAC;;QAEzF;QACA,OAAO;UACLT,KAAK,EAAEE,aAAa;UACpBD,WAAW,EAAEM;QACf,CAAC;MACH;IACF,CAAC,CAAC;IACF;IACA;IACA;IACA;IACA;IACA,KAAIG,kBAAO,CAACC,YAAY,EAAC;MACvBC,cAAc,EAAE,cAAc;MAC9BC,aAAa,EAAE;IACjB,CAAC,CAAC;IACF;IACA;IACA1F,eAAe,IACb,KAAI2F,+BAAoB,CAACC,UAAU,EAAC;MAClCC,YAAY,EAAE,IAAI;MAClBC,6BAA6B,EAAE,OAAO;MACtCvB,OAAO,EAAE,CAAC,QAAQ,EAAE,uBAAuB,CAAC;MAC5C;MACAwB,gBAAgB,EAAE,mBAAmB;MACrCC,wBAAwB,EAAE;MACxB;MACA,IAAIC,MAAM,CAAC,KAAK,CAAC;MACjB;MACA;MACA;MACA;MACA,IAAIA,MAAM,CAAC,kBAAkB,CAAC;IAElC,CAAC,CAAC,CACL,CAACZ,MAAM,CAACa,OAAO,CAAC;IACjB;IACA;IACA;IACA;IACAC,WAAW,EAAE;EACf,CAAC;AACH"}
|
|
1
|
+
{"version":3,"names":["baseStyleLoadersOptions","injectingLoader","MiniCssExtractPlugin","loader","cssLoaderPath","require","resolve","postCssLoaderPath","postCssConfig","moduleFileExtensions","shouldUseSourceMap","process","env","GENERATE_SOURCEMAP","imageInlineSizeLimit","parseInt","IMAGE_INLINE_SIZE_LIMIT","isEnvProduction","createWebpackConfig","workspaceDir","entryFiles","publicDir","isEnvProductionProfile","argv","includes","stats","children","errorDetails","mode","entry","main","output","path","join","filename","chunkFilename","extensions","map","ext","alias","react","fallback","module","fallbacks","dgram","dns","fs","stream","http2","net","tls","child_process","strictExportPresence","rules","test","fullySpecified","oneOf","stylesRegexps","cssNoModulesRegex","use","generateStyleLoaders","merge","cssLoaderOpts","importLoaders","sourceMap","sideEffects","type","parser","dataUrlCondition","maxSize","generator","options","babelrc","configFile","customize","cacheDirectory","cacheCompression","compact","cssModuleRegex","modules","getLocalIdent","getCSSModuleLocalIdent","sassNoModuleRegex","preProcessOptions","resolveUrlLoaderPath","preProcessorPath","sassModuleRegex","lessNoModuleRegex","lessModuleRegex","exclude","plugins","WebpackManifestPlugin","fileName","generate","seed","files","entrypoints","manifestFiles","reduce","manifest","file","name","entrypointFiles","filter","endsWith","webpack","IgnorePlugin","resourceRegExp","contextRegExp","WorkboxWebpackPlugin","GenerateSW","clientsClaim","maximumFileSizeToCacheInBytes","navigateFallback","navigateFallbackDenylist","RegExp","Boolean","performance"],"sources":["webpack.base.config.ts"],"sourcesContent":["import { merge } from 'lodash';\nimport webpack, { Configuration } from 'webpack';\nimport MiniCssExtractPlugin from 'mini-css-extract-plugin';\nimport { WebpackManifestPlugin } from 'webpack-manifest-plugin';\nimport WorkboxWebpackPlugin from 'workbox-webpack-plugin';\nimport getCSSModuleLocalIdent from 'react-dev-utils/getCSSModuleLocalIdent';\nimport path from 'path';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { generateStyleLoaders } from '@teambit/webpack.modules.generate-style-loaders';\nimport { fallbacks } from '@teambit/webpack';\nimport { postCssConfig } from './postcss.config';\n\nconst baseStyleLoadersOptions = {\n injectingLoader: MiniCssExtractPlugin.loader,\n cssLoaderPath: require.resolve('css-loader'),\n postCssLoaderPath: require.resolve('postcss-loader'),\n postCssConfig,\n};\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\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\nconst isEnvProduction = true;\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 createWebpackConfig(\n workspaceDir: string,\n entryFiles: string[],\n publicDir = 'public'\n): 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 // 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 stats: {\n children: true,\n errorDetails: true,\n },\n mode: 'production',\n entry: {\n main: entryFiles,\n },\n\n output: {\n // The build folder.\n path: path.join(workspaceDir, publicDir), // default value\n\n filename: 'static/js/[name].[contenthash:8].js',\n // TODO: remove this when upgrading to webpack 5\n // futureEmitAssets: true,\n // There are also additional JS chunk files if you use code splitting.\n chunkFilename: 'static/js/[name].[contenthash:8].chunk.js',\n // this defaults to 'window', but by setting it to 'this' then\n // module chunks which are built will work in web workers as well.\n // Commented out to use the default (self) as according to tobias with webpack5 self is working with workers as well\n // globalObject: 'this',\n },\n\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 // TODO: @uri please remember to remove after publishing evangelist and base-ui\n react: require.resolve('react'),\n 'react-dom/server': require.resolve('react-dom/server'),\n 'react-dom': require.resolve('react-dom'),\n // Allows for better profiling with ReactDevTools\n ...(isEnvProductionProfile && {\n 'react-dom$': 'react-dom/profiling',\n 'scheduler/tracing': 'scheduler/tracing-profiling',\n }),\n },\n fallback: {\n module: false,\n path: fallbacks.path,\n dgram: false,\n dns: false,\n fs: false,\n stream: false,\n http2: false,\n net: false,\n tls: false,\n child_process: false,\n process: fallbacks.process,\n },\n },\n module: {\n strictExportPresence: true,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n // Disable require.ensure as it's not a standard language feature.\n // { parser: { requireEnsure: false } },\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 // \"url\" loader works like \"file\" loader except that it embeds assets\n // smaller than specified limit in bytes as data URLs to avoid requests.\n // A missing `test` is equivalent to a match.\n {\n test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/, /\\.svg$/],\n type: 'asset',\n parser: {\n dataUrlCondition: {\n maxSize: imageInlineSizeLimit,\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 // 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 loader: require.resolve('babel-loader'),\n options: {\n babelrc: false,\n configFile: false,\n customize: require.resolve('babel-preset-react-app/webpack-overrides'),\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\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 // \"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|jsx|ts|tsx)$/, /\\.html$/, /\\.json$/, /\\.css$/],\n type: 'asset/resource',\n },\n // ** STOP ** Are you adding a new loader?\n // Make sure to add the new loader(s) before the \"file\" loader.\n ],\n },\n ],\n },\n plugins: [\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 // 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 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 // 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 webpack.IgnorePlugin({\n resourceRegExp: /^\\.\\/locale$/,\n contextRegExp: /moment$/,\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 isEnvProduction &&\n new WorkboxWebpackPlugin.GenerateSW({\n clientsClaim: true,\n maximumFileSizeToCacheInBytes: 5000000,\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 // Some libraries import Node modules but don't use them in the browser.\n // Tell webpack to provide empty mocks for them so importing them works.\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;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;AAAiD;AAAA;AAAA;AAAA;AAEjD,MAAMA,uBAAuB,GAAG;EAC9BC,eAAe,EAAEC,+BAAoB,CAACC,MAAM;EAC5CC,aAAa,EAAEC,OAAO,CAACC,OAAO,CAAC,YAAY,CA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eAAe,GAAGN,WAAW,CAAClE,IAAI,CAACyE,MAAM,CAAEX,QAAQ,IAAK,CAACA,QAAQ,CAACY,QAAQ,CAAC,MAAM,CAAC,CAAC;;QAEzF;QACA,OAAO;UACLT,KAAK,EAAEE,aAAa;UACpBD,WAAW,EAAEM;QACf,CAAC;MACH;IACF,CAAC,CAAC;IACF;IACA;IACA;IACA;IACA;IACA,KAAIG,kBAAO,CAACC,YAAY,EAAC;MACvBC,cAAc,EAAE,cAAc;MAC9BC,aAAa,EAAE;IACjB,CAAC,CAAC;IACF;IACA;IACA3F,eAAe,IACb,KAAI4F,+BAAoB,CAACC,UAAU,EAAC;MAClCC,YAAY,EAAE,IAAI;MAClBC,6BAA6B,EAAE,OAAO;MACtCvB,OAAO,EAAE,CAAC,QAAQ,EAAE,uBAAuB,CAAC;MAC5C;MACAwB,gBAAgB,EAAE,mBAAmB;MACrCC,wBAAwB,EAAE;MACxB;MACA,IAAIC,MAAM,CAAC,KAAK,CAAC;MACjB;MACA;MACA;MACA;MACA,IAAIA,MAAM,CAAC,kBAAkB,CAAC;IAElC,CAAC,CAAC,CACL,CAACZ,MAAM,CAACa,OAAO,CAAC;IACjB;IACA;IACA;IACA;IACAC,WAAW,EAAE;EACf,CAAC;AACH"}
|
|
@@ -338,6 +338,12 @@ function devConfig(workspaceDir, entryFiles, title) {
|
|
|
338
338
|
}, {
|
|
339
339
|
test: stylesRegexps().cssNoModulesRegex,
|
|
340
340
|
use: [require.resolve('style-loader'), require.resolve('css-loader')]
|
|
341
|
+
}, {
|
|
342
|
+
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
|
343
|
+
type: 'asset',
|
|
344
|
+
generator: {
|
|
345
|
+
filename: 'static/fonts/[hash][ext][query]'
|
|
346
|
+
}
|
|
341
347
|
}]
|
|
342
348
|
},
|
|
343
349
|
plugins: [new (_reactRefreshWebpackPlugin().default)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["matchNothingRegex","clientHost","process","env","WDS_SOCKET_HOST","clientPath","WDS_SOCKET_PATH","port","WDS_SOCKET_PORT","publicUrlOrPath","getPublicUrlOrPath","NODE_ENV","sep","moduleFileExtensions","devConfig","workspaceDir","entryFiles","title","resolveWorkspacePath","relativePath","path","resolve","host","HOST","mode","snapshot","managedPaths","devtool","entry","main","output","filename","pathinfo","publicPath","chunkFilename","devtoolModuleFilenameTemplate","info","pathNormalizeToLinux","absoluteResourcePath","infrastructureLogging","level","stats","errorDetails","devServer","allowedHosts","static","directory","staticOptions","serveIndex","watch","compress","hot","historyApiFallback","disableDotRule","index","client","webSocketURL","hostname","pathname","onBeforeSetupMiddleware","wds","app","use","evalSourceMapMiddleware","errorOverlayMiddleware","onAfterSetupMiddleware","redirectServedPath","noopServiceWorkerMiddleware","devMiddleware","slice","extensions","map","ext","alias","react","require","fallback","fs","fallbacks","stream","module","unsafeCache","rules","test","fullySpecified","enforce","include","descriptionData","componentId","value","exclude","loader","options","configFile","babelrc","presets","plugins","stylesRegexps","sassModuleRegex","modules","localIdentName","sourceMap","sassNoModuleRegex","lessModuleRegex","lessNoModuleRegex","cssModuleRegex","cssNoModulesRegex","ReactRefreshWebpackPlugin","HtmlWebpackPlugin","inject","templateContent","html","chunks","ProvidePlugin","fallbacksProvidePluginConfig"],"sources":["webpack.dev.config.ts"],"sourcesContent":["import { ProvidePlugin } from 'webpack';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport { fallbacksProvidePluginConfig, WebpackConfigWithDevServer, fallbacks } from '@teambit/webpack';\n\nimport HtmlWebpackPlugin from 'html-webpack-plugin';\nimport ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';\nimport errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware';\nimport evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware';\nimport noopServiceWorkerMiddleware from 'react-dev-utils/noopServiceWorkerMiddleware';\nimport redirectServedPath from 'react-dev-utils/redirectServedPathMiddleware';\nimport getPublicUrlOrPath from 'react-dev-utils/getPublicUrlOrPath';\nimport path, { sep } from 'path';\nimport { html } from './html';\n\n/*\n * Webpack config for the bit ui\n * i.e. `bit start --dev`,\n */\n\nconst matchNothingRegex = 'a^';\nconst clientHost = process.env.WDS_SOCKET_HOST;\nconst clientPath = process.env.WDS_SOCKET_PATH; // default is '/sockjs-node';\nconst port = process.env.WDS_SOCKET_PORT;\n\n// const reactRefreshRuntimeEntry = require.resolve('react-refresh/runtime');\n// const reactRefreshWebpackPluginRuntimeEntry = require.resolve(\n// '@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils'\n// );\n\nconst publicUrlOrPath = getPublicUrlOrPath(process.env.NODE_ENV === 'development', sep, `${sep}public`);\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\n];\n\nexport function devConfig(workspaceDir, entryFiles, title): WebpackConfigWithDevServer {\n const resolveWorkspacePath = (relativePath) => path.resolve(workspaceDir, relativePath);\n\n // Host\n const host = process.env.HOST || 'localhost';\n\n // Required for babel-preset-react-app\n process.env.NODE_ENV = 'development';\n\n return {\n // Environment mode\n mode: 'development',\n // improves HMR - assume node_modules might change\n snapshot: { managedPaths: [] },\n\n devtool: 'inline-source-map',\n\n // Entry point of app\n entry: {\n main: entryFiles,\n },\n\n output: {\n // Development filename output\n filename: 'static/js/[name].bundle.js',\n\n pathinfo: true,\n\n path: resolveWorkspacePath('/'),\n\n publicPath: publicUrlOrPath,\n\n chunkFilename: 'static/js/[name].chunk.js',\n\n // point sourcemap entries to original disk locations (format as URL on windows)\n devtoolModuleFilenameTemplate: (info) => pathNormalizeToLinux(path.resolve(info.absoluteResourcePath)),\n\n // this defaults to 'window', but by setting it to 'this' then\n // module chunks which are built will work in web workers as well.\n // Commented out to use the default (self) as according to tobias with webpack5 self is working with workers as well\n // globalObject: 'this',\n },\n\n infrastructureLogging: {\n level: 'error',\n },\n\n stats: {\n errorDetails: true,\n },\n\n devServer: {\n allowedHosts: 'all',\n\n static: [\n {\n directory: resolveWorkspacePath(publicUrlOrPath),\n staticOptions: {},\n // Don't be confused with `dev.publicPath`, it is `publicPath` for static directory\n // Can be:\n // publicPath: ['/static-public-path-one/', '/static-public-path-two/'],\n publicPath: publicUrlOrPath,\n // Can be:\n // serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)\n serveIndex: true,\n // Can be:\n // watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)\n watch: true,\n },\n ],\n\n // Enable compression\n compress: true,\n\n // Enable hot reloading\n hot: true,\n\n host,\n\n historyApiFallback: {\n disableDotRule: true,\n index: publicUrlOrPath,\n },\n\n client: {\n webSocketURL: {\n hostname: clientHost,\n pathname: clientPath,\n port,\n },\n },\n\n onBeforeSetupMiddleware(wds) {\n const { app } = wds;\n // Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`\n // middlewares before `redirectServedPath` otherwise will not have any effect\n // This lets us fetch source contents from webpack for the error overlay\n // @ts-ignore @types/wds mismatch\n app.use(evalSourceMapMiddleware(wds));\n // This lets us open files from the runtime error overlay.\n app.use(errorOverlayMiddleware());\n },\n\n onAfterSetupMiddleware({ app }) {\n // Redirect to `PUBLIC_URL` or `homepage` from `package.json` if url not match\n app.use(redirectServedPath(publicUrlOrPath));\n\n // This service worker file is effectively a 'no-op' that will reset any\n // previous service worker registered for the same host:port combination.\n // We do this in development to avoid hitting the production cache if\n // it used the same host and port.\n // https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432\n app.use(noopServiceWorkerMiddleware(publicUrlOrPath));\n },\n\n devMiddleware: {\n // forward static files\n publicPath: publicUrlOrPath.slice(0, -1),\n },\n },\n\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 alias: {\n react: require.resolve('react'),\n 'react-dom/server': require.resolve('react-dom/server'),\n 'react-dom': require.resolve('react-dom'),\n // 'react-refresh/runtime': require.resolve('react-refresh/runtime'),\n },\n fallback: {\n fs: false,\n path: fallbacks.path,\n stream: false,\n process: fallbacks.process,\n },\n },\n\n module: {\n // Webpack by default includes node_modules under its managed paths which cause the whole directory to be cached\n // Watch mode requires us to turn off unsafeCache as well\n // this de-optimizes the dev build but ensures hmr works when writing/linking into node modules.\n // However we do not lose the caching entirely like cache: false\n unsafeCache: false,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n test: /\\.js$/,\n enforce: 'pre',\n include: /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('@pmmmwh/react-refresh-webpack-plugin/loader'), require.resolve('source-map-loader')],\n },\n {\n test: /\\.(js|jsx|tsx|ts)$/,\n exclude: /node_modules/,\n include: workspaceDir,\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n configFile: false,\n babelrc: false,\n presets: [\n // Preset includes JSX, TypeScript, and some ESnext features\n require.resolve('babel-preset-react-app'),\n ],\n plugins: [require.resolve('react-refresh/babel')],\n },\n },\n ],\n },\n {\n test: stylesRegexps.sassModuleRegex,\n use: [\n require.resolve('style-loader'),\n {\n loader: require.resolve('css-loader'),\n options: {\n modules: {\n localIdentName: '[name]__[local]--[hash:base64:5]',\n },\n sourceMap: true,\n },\n },\n {\n loader: require.resolve('sass-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.sassNoModuleRegex,\n use: [\n require.resolve('style-loader'),\n require.resolve('css-loader'),\n {\n loader: require.resolve('sass-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.lessModuleRegex,\n use: [\n require.resolve('style-loader'),\n {\n loader: require.resolve('css-loader'),\n options: {\n modules: {\n localIdentName: '[name]__[local]--[hash:base64:5]',\n },\n sourceMap: true,\n },\n },\n {\n loader: require.resolve('less-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.lessNoModuleRegex,\n use: [\n require.resolve('style-loader'),\n require.resolve('css-loader'),\n {\n loader: require.resolve('less-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.cssModuleRegex,\n use: [\n require.resolve('style-loader'),\n {\n loader: require.resolve('css-loader'),\n options: {\n modules: {\n localIdentName: '[name]__[local]--[hash:base64:5]',\n },\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.cssNoModulesRegex,\n use: [require.resolve('style-loader'), require.resolve('css-loader')],\n },\n ],\n },\n\n plugins: [\n new ReactRefreshWebpackPlugin({\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 // Re-generate index.html with injected script tag.\n // The injected script tag contains a src value of the\n // filename output defined above.\n new HtmlWebpackPlugin({\n inject: true,\n templateContent: html(title || 'My component workspace'),\n chunks: ['main'],\n filename: 'index.html',\n }),\n new ProvidePlugin({ process: fallbacksProvidePluginConfig.process }),\n ],\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;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;A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tE,CAAC;IAEL,CAAC;IAED2E,OAAO,EAAE,CACP,KAAIW,oCAAyB,EAAC;MAC5B;MACA;MACA;MACArB,OAAO,EAAEtF;IACX,CAAC,CAAC;IACF;IACA;IACA;IACA,KAAI4G,4BAAiB,EAAC;MACpBC,MAAM,EAAE,IAAI;MACZC,eAAe,EAAE,IAAAC,YAAI,EAAC9F,KAAK,IAAI,wBAAwB,CAAC;MACxD+F,MAAM,EAAE,CAAC,MAAM,CAAC;MAChBjF,QAAQ,EAAE;IACZ,CAAC,CAAC,EACF,KAAIkF,wBAAa,EAAC;MAAE/G,OAAO,EAAEgH,wCAA4B,CAAChH;IAAQ,CAAC,CAAC;EAExE,CAAC;AACH"}
|
|
1
|
+
{"version":3,"names":["matchNothingRegex","clientHost","process","env","WDS_SOCKET_HOST","clientPath","WDS_SOCKET_PATH","port","WDS_SOCKET_PORT","publicUrlOrPath","getPublicUrlOrPath","NODE_ENV","sep","moduleFileExtensions","devConfig","workspaceDir","entryFiles","title","resolveWorkspacePath","relativePath","path","resolve","host","HOST","mode","snapshot","managedPaths","devtool","entry","main","output","filename","pathinfo","publicPath","chunkFilename","devtoolModuleFilenameTemplate","info","pathNormalizeToLinux","absoluteResourcePath","infrastructureLogging","level","stats","errorDetails","devServer","allowedHosts","static","directory","staticOptions","serveIndex","watch","compress","hot","historyApiFallback","disableDotRule","index","client","webSocketURL","hostname","pathname","onBeforeSetupMiddleware","wds","app","use","evalSourceMapMiddleware","errorOverlayMiddleware","onAfterSetupMiddleware","redirectServedPath","noopServiceWorkerMiddleware","devMiddleware","slice","extensions","map","ext","alias","react","require","fallback","fs","fallbacks","stream","module","unsafeCache","rules","test","fullySpecified","enforce","include","descriptionData","componentId","value","exclude","loader","options","configFile","babelrc","presets","plugins","stylesRegexps","sassModuleRegex","modules","localIdentName","sourceMap","sassNoModuleRegex","lessModuleRegex","lessNoModuleRegex","cssModuleRegex","cssNoModulesRegex","type","generator","ReactRefreshWebpackPlugin","HtmlWebpackPlugin","inject","templateContent","html","chunks","ProvidePlugin","fallbacksProvidePluginConfig"],"sources":["webpack.dev.config.ts"],"sourcesContent":["import { ProvidePlugin } from 'webpack';\nimport * as stylesRegexps from '@teambit/webpack.modules.style-regexps';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport { fallbacksProvidePluginConfig, WebpackConfigWithDevServer, fallbacks } from '@teambit/webpack';\n\nimport HtmlWebpackPlugin from 'html-webpack-plugin';\nimport ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';\nimport errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware';\nimport evalSourceMapMiddleware from 'react-dev-utils/evalSourceMapMiddleware';\nimport noopServiceWorkerMiddleware from 'react-dev-utils/noopServiceWorkerMiddleware';\nimport redirectServedPath from 'react-dev-utils/redirectServedPathMiddleware';\nimport getPublicUrlOrPath from 'react-dev-utils/getPublicUrlOrPath';\nimport path, { sep } from 'path';\nimport { html } from './html';\n\n/*\n * Webpack config for the bit ui\n * i.e. `bit start --dev`,\n */\n\nconst matchNothingRegex = 'a^';\nconst clientHost = process.env.WDS_SOCKET_HOST;\nconst clientPath = process.env.WDS_SOCKET_PATH; // default is '/sockjs-node';\nconst port = process.env.WDS_SOCKET_PORT;\n\n// const reactRefreshRuntimeEntry = require.resolve('react-refresh/runtime');\n// const reactRefreshWebpackPluginRuntimeEntry = require.resolve(\n// '@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils'\n// );\n\nconst publicUrlOrPath = getPublicUrlOrPath(process.env.NODE_ENV === 'development', sep, `${sep}public`);\n\nconst moduleFileExtensions = [\n 'web.mjs',\n 'mjs',\n 'web.js',\n 'js',\n 'web.ts',\n 'ts',\n 'web.tsx',\n 'tsx',\n 'json',\n 'web.jsx',\n 'jsx',\n];\n\nexport function devConfig(workspaceDir, entryFiles, title): WebpackConfigWithDevServer {\n const resolveWorkspacePath = (relativePath) => path.resolve(workspaceDir, relativePath);\n\n // Host\n const host = process.env.HOST || 'localhost';\n\n // Required for babel-preset-react-app\n process.env.NODE_ENV = 'development';\n\n return {\n // Environment mode\n mode: 'development',\n // improves HMR - assume node_modules might change\n snapshot: { managedPaths: [] },\n\n devtool: 'inline-source-map',\n\n // Entry point of app\n entry: {\n main: entryFiles,\n },\n\n output: {\n // Development filename output\n filename: 'static/js/[name].bundle.js',\n\n pathinfo: true,\n\n path: resolveWorkspacePath('/'),\n\n publicPath: publicUrlOrPath,\n\n chunkFilename: 'static/js/[name].chunk.js',\n\n // point sourcemap entries to original disk locations (format as URL on windows)\n devtoolModuleFilenameTemplate: (info) => pathNormalizeToLinux(path.resolve(info.absoluteResourcePath)),\n\n // this defaults to 'window', but by setting it to 'this' then\n // module chunks which are built will work in web workers as well.\n // Commented out to use the default (self) as according to tobias with webpack5 self is working with workers as well\n // globalObject: 'this',\n },\n\n infrastructureLogging: {\n level: 'error',\n },\n\n stats: {\n errorDetails: true,\n },\n\n devServer: {\n allowedHosts: 'all',\n\n static: [\n {\n directory: resolveWorkspacePath(publicUrlOrPath),\n staticOptions: {},\n // Don't be confused with `dev.publicPath`, it is `publicPath` for static directory\n // Can be:\n // publicPath: ['/static-public-path-one/', '/static-public-path-two/'],\n publicPath: publicUrlOrPath,\n // Can be:\n // serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)\n serveIndex: true,\n // Can be:\n // watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)\n watch: true,\n },\n ],\n\n // Enable compression\n compress: true,\n\n // Enable hot reloading\n hot: true,\n\n host,\n\n historyApiFallback: {\n disableDotRule: true,\n index: publicUrlOrPath,\n },\n\n client: {\n webSocketURL: {\n hostname: clientHost,\n pathname: clientPath,\n port,\n },\n },\n\n onBeforeSetupMiddleware(wds) {\n const { app } = wds;\n // Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`\n // middlewares before `redirectServedPath` otherwise will not have any effect\n // This lets us fetch source contents from webpack for the error overlay\n // @ts-ignore @types/wds mismatch\n app.use(evalSourceMapMiddleware(wds));\n // This lets us open files from the runtime error overlay.\n app.use(errorOverlayMiddleware());\n },\n\n onAfterSetupMiddleware({ app }) {\n // Redirect to `PUBLIC_URL` or `homepage` from `package.json` if url not match\n app.use(redirectServedPath(publicUrlOrPath));\n\n // This service worker file is effectively a 'no-op' that will reset any\n // previous service worker registered for the same host:port combination.\n // We do this in development to avoid hitting the production cache if\n // it used the same host and port.\n // https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432\n app.use(noopServiceWorkerMiddleware(publicUrlOrPath));\n },\n\n devMiddleware: {\n // forward static files\n publicPath: publicUrlOrPath.slice(0, -1),\n },\n },\n\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 alias: {\n react: require.resolve('react'),\n 'react-dom/server': require.resolve('react-dom/server'),\n 'react-dom': require.resolve('react-dom'),\n // 'react-refresh/runtime': require.resolve('react-refresh/runtime'),\n },\n fallback: {\n fs: false,\n path: fallbacks.path,\n stream: false,\n process: fallbacks.process,\n },\n },\n\n module: {\n // Webpack by default includes node_modules under its managed paths which cause the whole directory to be cached\n // Watch mode requires us to turn off unsafeCache as well\n // this de-optimizes the dev build but ensures hmr works when writing/linking into node modules.\n // However we do not lose the caching entirely like cache: false\n unsafeCache: false,\n rules: [\n {\n test: /\\.m?js/,\n resolve: {\n fullySpecified: false,\n },\n },\n {\n test: /\\.js$/,\n enforce: 'pre',\n include: /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('@pmmmwh/react-refresh-webpack-plugin/loader'), require.resolve('source-map-loader')],\n },\n {\n test: /\\.(js|jsx|tsx|ts)$/,\n exclude: /node_modules/,\n include: workspaceDir,\n use: [\n require.resolve('@pmmmwh/react-refresh-webpack-plugin/loader'),\n {\n loader: require.resolve('babel-loader'),\n options: {\n configFile: false,\n babelrc: false,\n presets: [\n // Preset includes JSX, TypeScript, and some ESnext features\n require.resolve('babel-preset-react-app'),\n ],\n plugins: [require.resolve('react-refresh/babel')],\n },\n },\n ],\n },\n {\n test: stylesRegexps.sassModuleRegex,\n use: [\n require.resolve('style-loader'),\n {\n loader: require.resolve('css-loader'),\n options: {\n modules: {\n localIdentName: '[name]__[local]--[hash:base64:5]',\n },\n sourceMap: true,\n },\n },\n {\n loader: require.resolve('sass-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.sassNoModuleRegex,\n use: [\n require.resolve('style-loader'),\n require.resolve('css-loader'),\n {\n loader: require.resolve('sass-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.lessModuleRegex,\n use: [\n require.resolve('style-loader'),\n {\n loader: require.resolve('css-loader'),\n options: {\n modules: {\n localIdentName: '[name]__[local]--[hash:base64:5]',\n },\n sourceMap: true,\n },\n },\n {\n loader: require.resolve('less-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.lessNoModuleRegex,\n use: [\n require.resolve('style-loader'),\n require.resolve('css-loader'),\n {\n loader: require.resolve('less-loader'),\n options: {\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.cssModuleRegex,\n use: [\n require.resolve('style-loader'),\n {\n loader: require.resolve('css-loader'),\n options: {\n modules: {\n localIdentName: '[name]__[local]--[hash:base64:5]',\n },\n sourceMap: true,\n },\n },\n ],\n },\n {\n test: stylesRegexps.cssNoModulesRegex,\n use: [require.resolve('style-loader'), require.resolve('css-loader')],\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 },\n\n plugins: [\n new ReactRefreshWebpackPlugin({\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 // Re-generate index.html with injected script tag.\n // The injected script tag contains a src value of the\n // filename output defined above.\n new HtmlWebpackPlugin({\n inject: true,\n templateContent: html(title || 'My component workspace'),\n chunks: ['main'],\n filename: 'index.html',\n }),\n new ProvidePlugin({ process: fallbacksProvidePluginConfig.process }),\n ],\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;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;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;AAA8B;AAAA;AAE9B;AACA;AACA;AACA;;AAEA,MAAMA,iBAAiB,GAAG,IAAI;AAC9B,MAAMC,UAAU,GAAGC,OAAO,CAACC,GAAG,CAACC,eAAe;AAC9C,MAAMC,UAAU,GAAGH,OAAO,CAACC,GAAG,CAACG,eAAe,CAAC,CAAC;AAChD,MAAMC,IAAI,GAAGL,OAAO,CAACC,GAAG,CAACK,eAAe;;AAExC;AACA;AACA;AACA;;AAEA,MAAMC,eAAe,GAAG,IAAAC,6BAAkB,EAACR,OAAO,CAACC,GAAG,CAACQ,QAAQ,KA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",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.971",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/ui-foundation/ui",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.ui-foundation",
|
|
8
8
|
"name": "ui",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.971"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"lodash": "4.17.21",
|
|
@@ -50,29 +50,29 @@
|
|
|
50
50
|
"@teambit/base-ui.loaders.loader-ribbon": "1.0.0",
|
|
51
51
|
"@teambit/base-ui.theme.fonts.roboto": "1.0.0",
|
|
52
52
|
"@teambit/design.themes.theme-toggler": "0.1.3",
|
|
53
|
-
"@teambit/aspect-loader": "0.0.
|
|
53
|
+
"@teambit/aspect-loader": "0.0.971",
|
|
54
54
|
"@teambit/component-id": "0.0.425",
|
|
55
55
|
"@teambit/toolbox.path.to-windows-compatible-path": "0.0.490",
|
|
56
56
|
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.500",
|
|
57
57
|
"@teambit/bit-error": "0.0.402",
|
|
58
|
-
"@teambit/cli": "0.0.
|
|
59
|
-
"@teambit/logger": "0.0.
|
|
58
|
+
"@teambit/cli": "0.0.651",
|
|
59
|
+
"@teambit/logger": "0.0.744",
|
|
60
60
|
"@teambit/ui-foundation.cli.ui-server-console": "0.0.498",
|
|
61
|
-
"@teambit/bundler": "0.0.
|
|
62
|
-
"@teambit/component": "0.0.
|
|
63
|
-
"@teambit/express": "0.0.
|
|
64
|
-
"@teambit/graphql": "0.0.
|
|
61
|
+
"@teambit/bundler": "0.0.971",
|
|
62
|
+
"@teambit/component": "0.0.971",
|
|
63
|
+
"@teambit/express": "0.0.749",
|
|
64
|
+
"@teambit/graphql": "0.0.971",
|
|
65
65
|
"@teambit/toolbox.network.get-port": "0.0.121",
|
|
66
|
-
"@teambit/aspect": "0.0.
|
|
67
|
-
"@teambit/cache": "0.0.
|
|
68
|
-
"@teambit/pubsub": "0.0.
|
|
69
|
-
"@teambit/react-router": "0.0.
|
|
66
|
+
"@teambit/aspect": "0.0.971",
|
|
67
|
+
"@teambit/cache": "0.0.744",
|
|
68
|
+
"@teambit/pubsub": "0.0.971",
|
|
69
|
+
"@teambit/react-router": "0.0.971",
|
|
70
70
|
"@teambit/design.theme.icons-font": "2.0.26",
|
|
71
71
|
"@teambit/design.ui.tooltip": "0.0.361",
|
|
72
72
|
"@teambit/ui-foundation.ui.global-loader": "0.0.497",
|
|
73
73
|
"@teambit/webpack.modules.generate-style-loaders": "0.0.110",
|
|
74
74
|
"@teambit/webpack.modules.style-regexps": "0.0.139",
|
|
75
|
-
"@teambit/webpack": "0.0.
|
|
75
|
+
"@teambit/webpack": "0.0.971"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/lodash": "4.14.165",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@apollo/client": "^3.6.0",
|
|
95
95
|
"react-router-dom": "^6.0.0",
|
|
96
|
-
"@teambit/legacy": "1.0.
|
|
96
|
+
"@teambit/legacy": "1.0.433",
|
|
97
97
|
"react": "^16.8.0 || ^17.0.0",
|
|
98
98
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
99
99
|
},
|
|
@@ -166,6 +166,13 @@ export default function createWebpackConfig(
|
|
|
166
166
|
},
|
|
167
167
|
},
|
|
168
168
|
},
|
|
169
|
+
{
|
|
170
|
+
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
|
171
|
+
type: 'asset',
|
|
172
|
+
generator: {
|
|
173
|
+
filename: 'static/fonts/[hash][ext][query]',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
169
176
|
// Process application JS with Babel.
|
|
170
177
|
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
|
|
171
178
|
{
|
|
@@ -315,6 +315,13 @@ export function devConfig(workspaceDir, entryFiles, title): WebpackConfigWithDev
|
|
|
315
315
|
test: stylesRegexps.cssNoModulesRegex,
|
|
316
316
|
use: [require.resolve('style-loader'), require.resolve('css-loader')],
|
|
317
317
|
},
|
|
318
|
+
{
|
|
319
|
+
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
|
|
320
|
+
type: 'asset',
|
|
321
|
+
generator: {
|
|
322
|
+
filename: 'static/fonts/[hash][ext][query]',
|
|
323
|
+
},
|
|
324
|
+
},
|
|
318
325
|
],
|
|
319
326
|
},
|
|
320
327
|
|
|
Binary file
|