Uncaught ReferenceError: require is not defined in angular2

后端 未结 2 1376
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-18 07:32


Angular 2 QuickStart



        
2条回答
  •  -上瘾入骨i
    2021-01-18 08:06

    Module should be system in tsconfig.json

    {
        "version": "1.0.0",
        "compilerOptions": {
            "target": "es5",
            **"module": "system",**
            "moduleResolution": "node",
            "sourceMap": true,
            "emitDecoratorMetadata": true,
            "experimentalDecorators": true,
            "removeComments": false,
            "noImplicitAny": false,
            "noLib": false,
            "declaration": false
        },
        "exclude": [
            "node_modules",
            "bower_components",
            "jspm_packages",
            "typings/main",
            "typings/main.d.ts"
        ]
    }
    

提交回复
热议问题