Skip to content

Services do not work in production build #808

Closed
@unnijeevan

Description

@unnijeevan
  1. OS? Windows 10
  2. Versions. 1.0.0-beta.1

3.Created a sample app using angular cli and created a service under shared folder.
Run ng build -prod
Run ng serve -prod
Get error

"Error loading http://localhost:4200/app/shared/index.js as "./app/shared" from http://localhost:4200/main.js ; Zone: ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost:4200/app/shared/index.js(…)"

  1. Not happening in dev build/

test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions