Error: ENOENT: no such file or directory, open ‘/path/to/entry/file’

I have a VS Code extension which I want to bundle using Webpack.

// webpack.config.js:

'use strict';

const path = require('path');
const webpack = require('webpack');

const config = {
    target: 'webworker',
    entry: './src/extension.ts',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'extension.js',
        libraryTarget: 'commonjs2',
        devtoolModuleFilenameTemplate: '../[resource-path]'
    },
    devtool: 'source-map',
    externals: {
        vscode: 'commonjs vscode'
    },
    resolve: {
        mainFields: ['browser', 'module', 'main'],
        extensions: ['.ts', '.js'],
    },
    stats: {
        errorDetails: true,
        children: true,
        logging: 'verbose'
    },
    module: {
        rules: [
            {
                test: /.ts$/,
                exclude: /node_modules/,
                use: [{
                    loader: 'ts-loader',
                    options: {
                        compilerOptions: {
                            "module": "es6"
                        }
                    }
                }],
            }
        ]
    }
};
module.exports = config;

package.json script section is as follows:

"scripts": {
    "vscode:prepublish": "webpack --mode production",
    "webpack": "webpack --mode development",
    "webpack-dev": "webpack --mode development --watch",
    "test-compile": "tsc -p ./"
},

When I try to build the project, it shows the following error:

ERROR in ../../../../../phxadenas101.oraclevcn.com/phx_wd202_db/WINDOWS.X64.rdd/240509/pack/src/extension.ts                                      
Module build failed (from ../../../../../moaadil/.ade/view_storage/moaadil_new_code9/odtvscode/src/client/oracle-vscode-extension/node_modules/ts-loader/index.js):                                                                          
Error: ENOENT: no such file or directory, open 'C:ADEphxadenas101.oraclevcn.comphx_wd202_dbWINDOWS.X64.rdd240509packextension.ts'

The Error Logs are as follows:

LOG from webpack.Compiler
<t> make hook: 205.42232 ms
<t> finish make hook: 0.09599 ms
<t> finish compilation: 3.47329 ms
<t> seal compilation: 253.97149 ms
<t> afterCompile hook: 0.08616 ms

LOG from webpack.Compilation
<t> compute affected modules: 0.34445 ms
<t> finish modules: 2.39043 ms
<t> report dependency errors and warnings: 0.13842 ms
<t> optimize dependencies: 1.92586 ms
<t> create chunks: 3.60265 ms
<t> compute affected modules with chunk graph: 0.27417 ms
<t> optimize: 11.00395 ms
1 modules hashed, 0 from cache (1 variants per module in average)
<t> module hashing: 2.85093 ms
100% code generated (1 generated, 0 from cache)
<t> code generation: 2.7763 ms
<t> runtime requirements.modules: 0.21028 ms
<t> runtime requirements.chunks: 0.81756 ms
<t> runtime requirements.entries: 0.67766 ms
<t> runtime requirements: 2.35274 ms
<t> hashing: initialize hash: 0.01921 ms
<t> hashing: hash errors: 0.0134 ms
<t> hashing: sort chunks: 0.11652 ms
<t> hashing: hash runtime modules: 0.08556 ms
<t> hashing: hash chunks: 3.26823 ms
<t> hashing: hash digest: 0.09857 ms
<t> hashing: process full hash modules: 0.01031 ms
<t> hashing: 4.39249 ms
<t> module assets: 0.14279 ms
<t> create chunk assets: 4.06871 ms
<t> process assets: 218.9624 ms

LOG from webpack.FlagDependencyExportsPlugin
<t> restore cached provided exports: 0.70847 ms
<t> figure out provided exports: 0.02832 ms
0% of exports of modules have been determined (1 no declared exports, 0 not cached, 0 flagged uncacheable, 0 from cache, 0 from mem cache, 0 additional calculations due to dependencies)
<t> store provided exports into cache: 0.03432 ms

LOG from webpack.SideEffectsFlagPlugin
<t> update dependencies: 0.23559 ms

LOG from webpack.FlagDependencyUsagePlugin
<t> initialize exports usage: 0.0861 ms
<t> trace exports usage in graph: 0.70691 ms

LOG from webpack.buildChunkGraph
<t> visitModules: prepare: 0.27698 ms
<t> visitModules: visiting: 1.06934 ms
2 queue items processed (1 blocks)
0 chunk groups connected
0 chunk groups processed for merging (0 module sets, 0 forked, 0 + 0 modules forked, 0 + 0 modules merged into fork, 0 resulting modules)
0 chunk group info updated (0 already connected chunk groups reconnected)
<t> visitModules: 2.1249 ms
<t> connectChunkGroups: 0.10829 ms
<t> cleanup: 0.05732 ms

LOG from webpack.SplitChunksPlugin
<t> prepare: 0.04901 ms
<t> modules: 1.99088 ms
<t> queue: 0.01594 ms
<t> maxSize: 0.11632 ms

LOG from webpack.ModuleConcatenationPlugin
<t> select relevant modules: 0.24129 ms
<t> sort relevant modules: 0.01742 ms
<t> find modules to concatenate: 0.01966 ms
<t> sort concat configurations: 0.01326 ms
<t> create concatenated modules: 0.11737 ms
+ 3 hidden lines

LOG from webpack.FileSystemInfo
0 new snapshots created
0% root snapshot uncached (0 / 0)
0% children snapshot uncached (0 / 0)
0 entries tested
File info in cache: 0 timestamps 0 hashes 0 timestamp hash combinations
Directory info in cache: 0 timestamps 0 hashes 0 timestamp hash combinations
Managed items info in cache: 0 items

I am not sure how it is getting the path to extension.ts with all the rdd info. my project file is pack. My directory structure is a s follows:

.vscode
src
  - <other code files here>
  - extension.ts
dist
  - extension.js
package.json
webpack.config.js

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật