umijs / qiankun

📦 🚀 Blazing fast, simple and complete solution for micro frontends.
https://qiankun.umijs.org
MIT License
15.85k stars 2.02k forks source link

example/angular9 build失败 #431

Closed waltbest2 closed 4 years ago

waltbest2 commented 4 years ago

What happens?

执行npm run build或build:qiankun都报错误 An unhandled exception occurred: polyfills-es5.js: Invalid left-hand side in assignment expression (9:2)

7 | exports["polyfills-es5.js"] = factory(polyfills-es5.js); 8 | else

9 | polyfills-es5.js = factory(polyfills-es5.js); | ^ 10 | })(window, function() { 11 | return /**/ (function(modules) { // webpackBootstrap 12 | /**/ // The module cache

Mini Showcase Repository(REQUIRED)

Provide a mini GitHub repository which can reproduce the issue.

How To Reproduce

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

BumbleBee-hyf commented 4 years ago

tsconfig.json 改成下面这样就可以了

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  },
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true
  }
}