title: Ionic 4 - WebApp show error Cannot find module "." when run ionic build --prod
body: <p>Ok I start to publish my ionic web app but I'm fasing this issue from yesterday. </p>
  
  <p>It only happens with --prod .If I run with ionic serve works ok.</p>
  
  <p>the error when see de console in my browser(chrome , firefox) is this.</p>
  
  <pre><code>Uncaught Error: Cannot find module "."
  at vendor.js:1
  at vendor.js:1
  at Object.&lt;anonymous&gt; (vendor.js:1)
  at e (vendor.js:1)
  at Object.483 (main.js:1)
  at e (vendor.js:1)
  at Object.480 (main.js:1)
  at e (vendor.js:1)
  at window.webpackJsonp (vendor.js:1)
  at main.js:1
  </code></pre>
  
  <p>this is my package.json:</p>
  
  <pre><code>  "dependencies": {
      "@agm/core": "1.0.0-beta.3",
      "@angular/animations": "5.2.9",
      "@angular/common": "5.2.9",
      "@angular/compiler": "5.2.9",
      "@angular/compiler-cli": "5.2.9",
      "@angular/core": "^5.2.9",
      "@angular/forms": "5.2.9",
      "@angular/http": "^5.2.9",
      "@angular/platform-browser": "5.2.9",
      "@angular/platform-browser-dynamic": "5.2.9",
      "@ionic-native/app-version": "^4.10.1",
      "@ionic-native/camera": "4.11.0",
      "@ionic-native/core": "^4.7.0",
      "@ionic-native/device": "^4.7.0",
      "@ionic-native/file": "^4.7.0",
      "@ionic-native/firebase": "^4.7.0",
      "@ionic-native/google-analytics": "^4.11.0",
      "@ionic-native/google-plus": "^4.7.0",
      "@ionic-native/image-resizer": "^4.6.0",
      "@ionic-native/in-app-browser": "^4.7.0",
      "@ionic-native/splash-screen": "4.11.0",
      "@ionic-native/sqlite": "^4.7.0",
      "@ionic-native/sqlite-porter": "^4.7.0",
      "@ionic-native/status-bar": "4.11.0",
      "@ionic/storage": "2.1.3",
      "@ngx-translate/core": "8.0.0",
      "@ngx-translate/http-loader": "^2.0.0",
      "@types/google-maps": "^3.2.0",
      "angular2-google-maps": "0.17.0",
      "angularfire2": "^5.0.0-rc.5-next",
      "cordova": "^8.0.0",
      "cordova-android": "^6.2.3",
      "cordova-browser": "5.0.3",
      "cordova-plugin-camera": "^4.0.2",
      "cordova-plugin-compat": "^1.2.0",
      "cordova-plugin-console": "^1.1.0",
      "cordova-plugin-device": "^2.0.1",
      "cordova-plugin-firebase": "^1.0.0",
      "cordova-plugin-geolocation": "^2.4.3",
      "cordova-plugin-google-analytics": "^1.8.3",
      "cordova-plugin-googleplus": "^5.3.0",
      "cordova-plugin-ionic-keyboard": "^2.0.5",
      "cordova-plugin-ionic-webview": "^1.1.19",
      "cordova-plugin-splashscreen": "^5.0.2",
      "cordova-plugin-statusbar": "^2.4.1",
      "cordova-plugin-whitelist": "^1.3.3",
      "cordova-sqlite-storage": "^2.3.0",
      "firebase": "^4.13.1",
      "imagemin": "^5.3.1",
      "ionic-angular": "3.9.2",
      "ionic-plugin-keyboard": "^2.2.1",
      "ionicons": "4.2.6",
      "local-storage": "^1.4.2",
      "mercadopago": "^1.0.13",
      "moment": "^1.7.2",
      "ng2-reactive-forms-validators": "^1.1.0",
      "rxjs": "5.5.8",
      "sqlite3": "^4.0.0",
      "sw-toolbox": "3.6.0",
      "typeorm": "0.2.7",
      "yarn": "^1.9.2",
      "zone.js": "0.8.20"
    },
    "devDependencies": {
      "@angular/cli": "1.5.0",
      "@angular/flex-layout": "6.0.0-beta.17",
      "@angular/tsc-wrapped": "^4.4.6",
      "@ionic/app-scripts": "^3.1.11",
      "@types/google.analytics": "0.0.39",
      "@types/googlemaps": "^3.30.11",
      "@types/node": "^10.5.4",
      "ionic": "4.0.1",
      "sql.js": "^0.5.0",
      "ts-node": "7.0.0",
      "typescript": "2.1.7"
    },
  </code></pre>
  
  <p>tsconfig.json</p>
  
  <pre><code>    {
    "atom": {
      "rewriteTsconfig": false
    },
    "compilerOptions": {
      "allowSyntheticDefaultImports": true,
      "declaration": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "noImplicitAny": false,
      "lib": [
        "dom",
        "es2017"
      ],
  
      "module": "commonjs",
      "moduleResolution": "node",
      "sourceMap": true,
      "target": "ES2017",
      "types" : ["node"],
      "typeRoots": [
        "node_modules/@types"
      ]
    },
    "include": [
      "src/**/*.ts"
    ],
    "exclude": [
      "node_modules",
      "src/**/*.spec.ts",
      "src/**/__tests__/*.ts"
    ],
    "compileOnSave": false,
    "atom": {
      "rewriteTsconfig": false
    }
  }
  </code></pre>
  
  <p>Don't know what's happend. It's only happend when run ionic --prod.</p>
  
  <p>**</p>
  
  <blockquote>
    <p>Uncaught Error: Cannot find module "."  at vendor.js:1</p>
  </blockquote>
  
  <p>** </p>
  
  <p>this is the index.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" dir="ltr"&gt;
  &lt;head&gt;
    &lt;script data-ionic="inject"&gt;
      (function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='^5.2.9';i.staticDir='build/';})(window);
    &lt;/script&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Ionic App&lt;/title&gt;
    &lt;meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"&gt;
    &lt;meta name="format-detection" content="telephone=no"&gt;
    &lt;meta name="msapplication-tap-highlight" content="no"&gt;
  
    &lt;link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico"&gt;
    &lt;link rel="manifest" href="manifest.json"&gt;
    &lt;meta name="theme-color" content="#4e8ef7"&gt;
  
    &lt;meta name="apple-mobile-web-app-capable" content="yes"&gt;
    &lt;meta name="apple-mobile-web-app-status-bar-style" content="black"&gt;
  
     &lt;!--cordova.js required for cordova apps (remove if not needed)--&gt;
    &lt;script src="cordova.js"&gt;&lt;/script&gt;
  
    &lt;!-- un-comment this code to enable service worker--&gt;
    &lt;script&gt;
      if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register('service-worker.js')
          .then(() =&gt; console.log('service worker installed'))
          .catch(err =&gt; console.error('Error', err));
      }
    &lt;/script&gt;
  
    &lt;link href="build/main.css" rel="stylesheet"&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
    &lt;ion-app&gt;&lt;/ion-app&gt;
  
  
    &lt;script src="build/polyfills.js"&gt;&lt;/script&gt;
    &lt;script src="build/vendor.js"&gt;&lt;/script&gt;
    &lt;script src="build/main.js"&gt;&lt;/script&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>