@teambit/webpack 0.0.659 → 0.0.660
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/{__preview-1645932113477.js → __preview-1646018619726.js} +1 -1
- package/config/webpack.dev.config.ts +4 -2
- package/dist/config/webpack.dev.config.js +7 -6
- package/dist/config/webpack.dev.config.js.map +1 -1
- package/package-tar/teambit-webpack-0.0.660.tgz +0 -0
- package/package.json +7 -6
- package/package-tar/teambit-webpack-0.0.659.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.webpack_webpack@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.webpack_webpack@0.0.660/dist/webpack.composition.js')]
|
|
@@ -108,11 +108,13 @@ export function configFactory(
|
|
|
108
108
|
overlay: false,
|
|
109
109
|
},
|
|
110
110
|
|
|
111
|
-
onBeforeSetupMiddleware(
|
|
111
|
+
onBeforeSetupMiddleware(wds) {
|
|
112
|
+
const { app } = wds;
|
|
112
113
|
// Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`
|
|
113
114
|
// middlewares before `redirectServedPath` otherwise will not have any effect
|
|
114
115
|
// This lets us fetch source contents from webpack for the error overlay
|
|
115
|
-
|
|
116
|
+
// @ts-ignore - @types/WDS mismatch - 3.11.6 vs 4.0.3
|
|
117
|
+
app.use(evalSourceMapMiddleware(wds));
|
|
116
118
|
// This lets us open files from the runtime error overlay.
|
|
117
119
|
app.use(errorOverlayMiddleware());
|
|
118
120
|
},
|
|
@@ -209,14 +209,15 @@ function configFactory(devServerID, workspaceDir, entryFiles, publicRoot, public
|
|
|
209
209
|
overlay: false
|
|
210
210
|
},
|
|
211
211
|
|
|
212
|
-
onBeforeSetupMiddleware({
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
// Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`
|
|
212
|
+
onBeforeSetupMiddleware(wds) {
|
|
213
|
+
const {
|
|
214
|
+
app
|
|
215
|
+
} = wds; // Keep `evalSourceMapMiddleware` and `errorOverlayMiddleware`
|
|
217
216
|
// middlewares before `redirectServedPath` otherwise will not have any effect
|
|
218
217
|
// This lets us fetch source contents from webpack for the error overlay
|
|
219
|
-
|
|
218
|
+
// @ts-ignore - @types/WDS mismatch - 3.11.6 vs 4.0.3
|
|
219
|
+
|
|
220
|
+
app.use((0, _evalSourceMapMiddleware().default)(wds)); // This lets us open files from the runtime error overlay.
|
|
220
221
|
|
|
221
222
|
app.use((0, _errorOverlayMiddleware().default)());
|
|
222
223
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack.dev.config.ts"],"names":["publicUrlOrPath","process","env","NODE_ENV","configFactory","devServerID","workspaceDir","entryFiles","publicRoot","publicPath","pubsub","title","resolveWorkspacePath","relativePath","path","resolve","publicDirectory","mode","devtool","entry","map","filePath","output","filename","pathinfo","chunkFilename","devtoolModuleFilenameTemplate","info","absoluteResourcePath","infrastructureLogging","level","stats","errorDetails","devServer","allowedHosts","static","directory","staticOptions","serveIndex","watch","compress","hot","historyApiFallback","disableDotRule","index","client","overlay","onBeforeSetupMiddleware","
|
|
1
|
+
{"version":3,"sources":["webpack.dev.config.ts"],"names":["publicUrlOrPath","process","env","NODE_ENV","configFactory","devServerID","workspaceDir","entryFiles","publicRoot","publicPath","pubsub","title","resolveWorkspacePath","relativePath","path","resolve","publicDirectory","mode","devtool","entry","map","filePath","output","filename","pathinfo","chunkFilename","devtoolModuleFilenameTemplate","info","absoluteResourcePath","infrastructureLogging","level","stats","errorDetails","devServer","allowedHosts","static","directory","staticOptions","serveIndex","watch","compress","hot","historyApiFallback","disableDotRule","index","client","overlay","onBeforeSetupMiddleware","wds","app","use","onAfterSetupMiddleware","devMiddleware","join","extensions","alias","fallbacksAliases","fallback","fallbacks","plugins","HtmlWebpackPlugin","templateContent","webpack","ProvidePlugin","fallbacksProvidePluginConfig","WebpackBitReporterPlugin","options"],"mappings":";;;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AAEA,MAAMA,eAAe,GAAG,mCAAmBC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,aAA5C,EAA2D,GAA3D,EAAgE,SAAhE,CAAxB;;AAEO,SAASC,aAAT,CACLC,WADK,EAELC,YAFK,EAGLC,UAHK,EAILC,UAJK,EAKLC,UALK,EAMLC,MANK,EAOLC,KAPK,EAQuB;AAC5B,QAAMC,oBAAoB,GAAIC,YAAD,IAAkBC,gBAAKC,OAAL,CAAaT,YAAb,EAA2BO,YAA3B,CAA/C,CAD4B,CAG5B;;;AACAZ,EAAAA,OAAO,CAACC,GAAR,CAAYC,QAAZ,GAAuB,aAAvB;AAEA,QAAMa,eAAe,GAAI,GAAER,UAAW,IAAGC,UAAW,EAApD;AAEA,SAAO;AACL;AACAQ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ebpackPlugin from 'html-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 { PubsubMain } from '@teambit/pubsub';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport { WebpackConfigWithDevServer } from '../webpack.dev-server';\nimport { fallbacks } from './webpack-fallbacks';\n\nimport { html } from './html';\n\nimport { WebpackBitReporterPlugin } from '../plugins/webpack-bit-reporter-plugin';\nimport { fallbacksProvidePluginConfig } from './webpack-fallbacks-provide-plugin-config';\nimport { fallbacksAliases } from './webpack-fallbacks-aliases';\n\nconst publicUrlOrPath = getPublicUrlOrPath(process.env.NODE_ENV === 'development', '/', '/public');\n\nexport function configFactory(\n devServerID: string,\n workspaceDir: string,\n entryFiles: string[],\n publicRoot: string,\n publicPath: string,\n pubsub: PubsubMain,\n title?: string\n): WebpackConfigWithDevServer {\n const resolveWorkspacePath = (relativePath) => path.resolve(workspaceDir, relativePath);\n\n // Required for babel-preset-react-app\n process.env.NODE_ENV = 'development';\n\n const publicDirectory = `${publicRoot}/${publicPath}`;\n\n return {\n // Environment mode\n mode: 'development',\n\n devtool: 'inline-source-map',\n\n // Entry point of app\n entry: entryFiles.map((filePath) => resolveWorkspacePath(filePath)),\n\n output: {\n // Development filename output\n filename: 'static/js/[name].bundle.js',\n\n pathinfo: true,\n\n path: resolveWorkspacePath(publicDirectory),\n\n // publicPath: resolveWorkspacePath(publicDirectory),\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(publicDirectory),\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: publicDirectory,\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 historyApiFallback: {\n disableDotRule: true,\n index: resolveWorkspacePath(publicDirectory),\n },\n\n client: {\n overlay: false,\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 - 3.11.6 vs 4.0.3\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: path.join('/', publicRoot),\n },\n },\n\n resolve: {\n extensions: ['.ts', '.tsx', '.js', '.mdx', '.md'],\n alias: fallbacksAliases,\n\n fallback: fallbacks as any,\n },\n\n plugins: [\n new HtmlWebpackPlugin({\n templateContent: html(title || 'Component preview'),\n filename: 'index.html',\n }),\n\n new webpack.ProvidePlugin(fallbacksProvidePluginConfig),\n\n new WebpackBitReporterPlugin({\n options: { pubsub, devServerID },\n }),\n ],\n };\n}\n"]}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/webpack",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.660",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/webpack/webpack",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.webpack",
|
|
8
8
|
"name": "webpack",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.660"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"webpack": "5.51.1",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"compression-webpack-plugin": "9.2.0",
|
|
20
20
|
"html-webpack-plugin": "5.3.2",
|
|
21
21
|
"webpack-assets-manifest": "5.1.0",
|
|
22
|
-
"react-dev-utils": "
|
|
22
|
+
"react-dev-utils": "12.0.0",
|
|
23
23
|
"vm-browserify": "1.1.2",
|
|
24
24
|
"util": "0.12.3",
|
|
25
25
|
"url": "0.11.0",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"core-js": "^3.0.0",
|
|
45
45
|
"@teambit/webpack.modules.config-mutator": "0.0.137",
|
|
46
46
|
"@teambit/bit-error": "0.0.394",
|
|
47
|
-
"@teambit/bundler": "0.0.
|
|
47
|
+
"@teambit/bundler": "0.0.660",
|
|
48
48
|
"@teambit/logger": "0.0.539",
|
|
49
49
|
"@teambit/cli": "0.0.449",
|
|
50
|
-
"@teambit/pubsub": "0.0.
|
|
51
|
-
"@teambit/workspace": "0.0.
|
|
50
|
+
"@teambit/pubsub": "0.0.660",
|
|
51
|
+
"@teambit/workspace": "0.0.660",
|
|
52
52
|
"@teambit/webpack.modules.generate-externals": "0.0.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@types/lodash": "4.14.165",
|
|
57
57
|
"@types/react": "^17.0.8",
|
|
58
58
|
"@types/webpack-dev-server": "4.0.3",
|
|
59
|
+
"@types/react-dev-utils": "9.0.10",
|
|
59
60
|
"@types/testing-library__jest-dom": "5.9.5",
|
|
60
61
|
"@types/jest": "^26.0.0",
|
|
61
62
|
"@types/react-dom": "^17.0.5",
|
|
Binary file
|