Unable to compile with angular 5
Closed this issue · 2 comments
First I'd like to say that I really like the idea of the project.
After adding this code
import { action, base } from 'ts-action';
const addTodo = action({
type: 'ADD_TODO',
...base(
class {
constructor(public id: number, public text: string) {}
}
),
});
in our angular 5(angular-cli 1.5) project following error occurs:
ERROR in ./node_modules/ts-action/action.ts
Module build failed: Error: node_modules/ts-action/action.ts is not part of the compilation output. Please check the other error messages for details.
Thanks for opening the issue. This is most likely related to the distribution including the actual .ts
files, rather than .d.ts
files. It's the approach that was taken with IxJS and I've done the same, as it has a number of advantages.
I've not yet upgraded to Angular 5 and I don't see the error using Angular 4 and version 1.49 of the CLI.
I'll investigate this, but if you could install IxJS and confirm whether or not it exhibits the same problem, I'd be grateful. Something as simple as this ought to be sufficient:
import { map } from 'ix/iterable/map';
export const m = map;
I've changed the distribution in 3.0.1 to include .d.ts
files rather than .ts
files. If that doesn't solve your problem, please re-open the issue.