Closed bluetech closed 7 years ago
Sorry, it is unclear from code, but how do it fails? Does webpack throw red-color error to console?
(The test failure seems unrelated.)
For the example above it looks like this:
Hash: 2cc26f28ae9ad76f7c58
Version: webpack 2.4.1
Time: 217ms
Asset Size Chunks Chunk Names
foo.js 2.79 kB 0 [emitted] foo
[0] ./src/foo.js 160 bytes {0} [built] [failed] [1 error]
ERROR in ./src/foo.js
Module build failed: error: couldn't process source due to parse error,'import' and 'export' may appear only with 'sourceType: module' (1:0)
The errors are printed in red.
Note that I have no idea about webpack, I'm just trying it for the first time, and looked up how errors are supposed to be handled here. If anyone can do it better, that would be great.
Awesome! Thank you, I'll check the tests.
If
ngAnnotate()
fails, it returns an object like this (please ignore this particular error - just an example):When this happens, the loader returns the original file. Instead, it should report an error and fail.