Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Problems building for production from fresh install #43

@cepkoCC

Description

@cepkoCC
  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

Starting from a pristine install, I had to make a couple of modifications before I was able to successfully build and serve for production.


First, I noticed that webpack-dev-server.js was being included in index.html regardless of NODE_ENV.

To fix this, I changed:

src/index.html L56
from <% if (webpackConfig.metadata.ENV === 'development') { %>
to <% if (process.env.ENV === 'development') { %>


Next, I was having trouble getting my styles included with an EXCEPTION: Failed to load %5Bobject%20Object%5D error as seen in this SO question

For this, I changed:

src/app/app.component.ts L47
from styleUrls: [require('!style!css!sass!../sass/main.scss')],
to styles: String[require('!style!css!sass!../sass/main.scss')],

  • Please tell us about your environment:
  • Angular version: 2.0.0-beta.X
  • Browser: [all /Chrome/Firefox ]
  • Node 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions