{"id":15689489,"url":"https://github.com/masterkale/fork-ts-checker-webpack-plugin-bug-repro-561","last_synced_at":"2025-03-30T12:12:14.916Z","repository":{"id":73085908,"uuid":"346791534","full_name":"MasterKale/fork-ts-checker-webpack-plugin-bug-repro-561","owner":"MasterKale","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-11T18:56:58.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T13:48:22.580Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MasterKale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-11T17:58:37.000Z","updated_at":"2021-03-11T18:57:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ffb4d8f-144f-4bfe-a107-e46fe0af7290","html_url":"https://github.com/MasterKale/fork-ts-checker-webpack-plugin-bug-repro-561","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"c6e5f7d9ac3f5fb1661501f4a4d387fb6df4cf71"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2Ffork-ts-checker-webpack-plugin-bug-repro-561","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2Ffork-ts-checker-webpack-plugin-bug-repro-561/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2Ffork-ts-checker-webpack-plugin-bug-repro-561/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MasterKale%2Ffork-ts-checker-webpack-plugin-bug-repro-561/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MasterKale","download_url":"https://codeload.github.com/MasterKale/fork-ts-checker-webpack-plugin-bug-repro-561/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314168,"owners_count":20757463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T18:02:32.276Z","updated_at":"2025-03-30T12:12:14.896Z","avatar_url":"https://github.com/MasterKale.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fork-ts-checker-webpack-plugin ([Issue #561](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/561))\n\n\n## Issue\n\n`fork-ts-checker-webpack-plugin` is not referencing module declarations as specified in **tsconfig.json** \u003e `compilerOptions.typeRoots`.\n\n## Reproduction steps:\n\n1. `npm install`\n2. `npm run build:tsc`\n3. Observe no build error\n4. `npm run build:webpack`\n5. Observe build error:\n\n```\nHash: 18f26cef5e5db950fb3c\nVersion: webpack 4.41.2\nTime: 1962ms\nBuilt at: 03/11/2021 9:49:16 AM\n 2 assets\nEntrypoint index = index.js\n[1] ./src/ts/Acme.png 61 bytes {0} [built]\n[2] ./src/ts/index.tsx 189 bytes {0} [built]\n    + 3 hidden modules\n\nERROR in src/ts/index.tsx:3:22\nTS2307: Cannot find module './Acme.png' or its corresponding type declarations.\n    1 | import React from 'react';\n    2 |\n  \u003e 3 | import AcmeLogo from './Acme.png';\n      |                      ^^^^^^^^^^^^\n    4 |\n    5 | const IndexComponent: React.FC = () =\u003e {\n    6 |   return \u003cimg src={AcmeLogo}/\u003e;\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 2\nnpm ERR! delete-me-webpack-ts-type-resolution@1.0.0 build: `webpack --color --env production`\nnpm ERR! Exit status 2\nnpm ERR!\nnpm ERR! Failed at the delete-me-webpack-ts-type-resolution@1.0.0 build script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n```\n\n### Workaround\n\n1. Update **webpack.config.js** to add the following to the `configOverwrite.include` array passed to the `ForkTsCheckerWebpackPlugin` plugin in **webpack.config.js**:\n\n```\n'./src/types/**/*.ts'\n```\n2. Re-run `npm run build:webpack`\n3. Observe no build error\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterkale%2Ffork-ts-checker-webpack-plugin-bug-repro-561","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterkale%2Ffork-ts-checker-webpack-plugin-bug-repro-561","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterkale%2Ffork-ts-checker-webpack-plugin-bug-repro-561/lists"}