tsconfig.json

This is the config file for ts-loader.
This file specifies compiler options used for building the project
link - typescriptlang.org/docs/handbook/compiler-options.html


{ 
    "compilerOptions": {
// ??
        "module": "commonjs",

// which version of ECMAScript to target - (esnext)
        "target": "es6",

// don't emit; only do type-checking, leave transformation to Babel
         "noEmit": true,

// Enable strictest settings like strictNullChecks & noImplicitAny.
         "strict": true,

         // Disallow features that require cross-file information for emit.
         // Cross-file information is not supported by Babel.
         "isolatedModules": true,

         // Import non-ES modules as default imports.
         "esModuleInterop": true,

         // Allow default imports from modules with no default export (e.g
         // import React from "React")
         "allowSyntheticDefaultImports": true,

         // Support jsx in .tsx files (https://www.typescriptlang.org/docs/handbook/jsx.html)
         "jsx": "preserve",

         // Library files to be used in the project.
         // Tells the compiler that "DOM-APIs" and new ECMAScript features are valid.

         "lib": ["dom", "es2018"],
         // Module aliases (if you use module aliases in webpack)

         "paths": {
             "yourModule": ["./some/modulefile.ts"]


        "sourceMap": false,


        "outDir": "build",


        "jsx": "react"
    },
    "exclude": [
        "node_modules"
    ]
}

CompilerOptions

disableSizeLimit - disable size limitation on JavaScript project
module - specify module code implementation
allowJS - allow javascript files to be compiled
outDir - redirect output structure to the directory



compileOnSave

generate all the files upon saving


typeAcquisition



exclude





© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext