Skip to content

Bug: WebPack compile warning became an error from 1.0.0 to 1.0.1 #6150

@johnpapa

Description

@johnpapa

OS

Mac OSX Sierra 10.12.4

Versions

@angular/cli: 1.0.1
node: 6.9.1
os: darwin x64
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

Repro steps.

When we have a javascript min file that lacks a map file, we get a warning in the console, but webpack blocks the rendering of the app in the browser with an error.

This behavior did not happen with angular cli v 1.0.0 but does now with 1.0.1

git clone https://github.com/johnpapa/angular-event-view-cli.git
cd angular-event-view-cli
npm i

Delete the file src/assets/material.min.js.map

Run ng s -o

The browser will show

image

It can be bypassed by adding a fake map file (which is what I have).

This can happen when legacy javascript files are inherited and used in an app. This js file was not available in npm as it was created from a custom style generator tool on a web site and handed to me.

cc // @filipesilva

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions