You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there any way to pass a tsconfig.json to resolve in webpack?
to prevent this error Error: ENOENT: no such file or directory, stat 'tsconfig.json' at Object.statSync (node:fs:1551:3) at resolveConfigPath (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/tsconfig-loader.js:56:12) at loadSyncDefault (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/tsconfig-loader.js:33:22) at tsConfigLoader (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/tsconfig-loader.js:27:22) at configLoader (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/config-loader.js:28:22) at Object.loadConfig (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/config-loader.js:8:12) at new TsconfigPathsPlugin (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths-webpack-plugin/lib/plugin.js:33:40) at file:///home/seriesr/WebstormProjects/untitled/index.js:74:23 at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async Promise.all (index 0) { errno: -2, syscall: 'stat', code: 'ENOENT', path: 'tsconfig.json'
is there any way to pass a tsconfig.json to resolve in webpack?
to prevent this error
Error: ENOENT: no such file or directory, stat 'tsconfig.json' at Object.statSync (node:fs:1551:3) at resolveConfigPath (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/tsconfig-loader.js:56:12) at loadSyncDefault (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/tsconfig-loader.js:33:22) at tsConfigLoader (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/tsconfig-loader.js:27:22) at configLoader (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/config-loader.js:28:22) at Object.loadConfig (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths/lib/config-loader.js:8:12) at new TsconfigPathsPlugin (/home/seriesr/WebstormProjects/untitled/node_modules/tsconfig-paths-webpack-plugin/lib/plugin.js:33:40) at file:///home/seriesr/WebstormProjects/untitled/index.js:74:23 at ModuleJob.run (node:internal/modules/esm/module_job:198:25) at async Promise.all (index 0) { errno: -2, syscall: 'stat', code: 'ENOENT', path: 'tsconfig.json'
my code:
const code = await webpackCompile({ webpack, config: { mode: 'development', target: 'web', output:{ path: '/' }, module: { rules: [ { test: /\.(ts|tsx)$/i, loader: "ts-loader", exclude: ["/node_modules/"], }, { test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i, type: "asset", }, ], }, resolve: { extensions: [".tsx", ".ts", ".jsx", ".js", "..."], plugins: [new TsconfigPathsPlugin({ configFile: 'tsconfig.json', baseUrl: './', extensions: [".tsx", ".ts", ".jsx", ".js", "..."], })], }, plugins: [...] }, code: fileContent, })
The text was updated successfully, but these errors were encountered: