0

i create my first project and started on angular 2 getstarted

I changed my config tsconfig.json with

{

"compilerOptions": {
  "target": "es5",
  "module": "system",
  "moduleResolution": "node",
  "sourceMap": true,
  "emitDecoratorMetadata": true,
  "experimentalDecorators": true,
  "removeComments": false,
  "noImplicitAny": false,
  "outDir": "dist"  <---- NEW 
 },
   "exclude": [
     "node_modules",
     "typings/main",
    "typings/main.d.ts"
    ]
}

and I add on my package.json "lite": "lite-server --baseDir ./dist"

Why the app don't start? Please Help me. Thank's Marco.

Bonci Marco
  • 301
  • 2
  • 5
  • 17

1 Answers1

2

I think you can't pass baseDir argument to lite-server. Although, I don't see the cli arguments documented neither in npmjs nor in github. You have to have a bs-config.json file.

{
   "server": { "baseDir": "./dist" }
}

Of course,that would require you to move index.html to inside dist/

Abdulrahman Alsoghayer
  • 16,462
  • 7
  • 51
  • 56