Webpack reported an error when configuring typescript

I. my project"s basic configuration

  • 1, package.json

    ERROR in ./src/index.ts 6:9
    Module parse failed: Unexpected token (6:9)
    You may need an appropriate loader to handle this file type.
    |
    | class Demo {
    >   public name: string;
    |   constructor(name: string) {
    |     this.name = name;
     @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/index.ts main[1]
    Child html-webpack-plugin for "index.html":
         1 asset
        Entrypoint undefined = index.html
        [./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 409 bytes {0} [built]
        [./node_modules/lodash/lodash.js] 527 KiB {0} [built]
        [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 506 bytes {0} [built]
        [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 669 bytes {0} [built]
     wdm: Failed to compile.
Mar.10,2022

ts file needs to specify loader to parse

{
    test: /\.ts?$/,
    loader: 'ts-loader'
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35e22-2bfc6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35e22-2bfc6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?