Getting rid of the pages directory

As far as I’m aware, pages are no different from regular Angular 2 Components, which is why I want to handle them as regular components, and use the Angular 2 recommended directory structure (, instead of having them in a separate directory.

I have started a new project with the ionic command, which runs perfectly. Then I started to move pages with Intellij, which handles the naming refactoring for me. This goes well, but when I move the final directory in page, I get the following error during build:

[12:12:12] Error: Could not resolve entry (./.tmp/app/
at D:\Programming\driven-app\node_modules\rollup\dist\rollup.js:8602:28
at process._tickCallback (internal/process/next_tick.js:103:7)

And the app no longer works. It doesn’t seem to matter which directory I move last, it works fine as long as there is at least one directory in pages, otherwise it breaks down. How can I get rid of the pages directory properly?