Configure typescript, packaging error

  1. after migrating from react to typescript, to configure typescript, execute the packaging command

clipboard.png

tsconfig.json configuration

{
    "compilerOptions": {
        "outDir": "./dist/", // path to output directory
        "sourceMap": true, // allow sourcemap support
        "noImplicitAny": true,
        "strictNullChecks": true, // enable strict null checks as a best practice
        "module": "es6", // specify module code generation
        "jsx": "react", // use typescript to transpile jsx to js
        "target": "es5", // specify ECMAScript target version
        "allowJs": true // allow a partial TypeScript and JavaScript codebase
    },
    "include": ["./src/"]
}

partial configuration of webpack.conf.js

module: {
        rules: [
            {
                test: /\.(t|j)sx?$/,
                exclude: /node_modules/,
                use: ["awesome-typescript-loader"]
            },
            {
                enforce: "pre",
                test: /\.js$/,
                loader: "source-map-loader"
            },
        ]
    },
:
"webpack": "^3.12.0",
"awesome-typescript-loader": "^5.2.0",
"typescript": "^2.9.2",
"@types/react": "^16.4.11",
"@types/react-dom": "^16.0.7",

it doesn"t feel like a webpack version of the problem, and there is no corresponding solution on the Internet. What kind of problem do you solve?

May.22,2021

isn't that clear? @ storybook/react upgrade to 4.x


lower the version of awesome-typescript-loader. The latest version requires webpack4, but webpack4 is not backward compatible, so choose to lower the version of awesome-typescript-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-1be9f09-53053.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-1be9f09-53053.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?