Bonci Marco
Bonci Marco

Reputation: 301

angular2 config outDir

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.

Upvotes: 0

Views: 857

Answers (1)

Abdulrahman Alsoghayer
Abdulrahman Alsoghayer

Reputation: 16540

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/

Upvotes: 2

Related Questions