Replies: 1 comment 9 replies
-
That's interesting. In our project, we've been able to use rollup plugins to chain everything, and that has seemed really nice. I even wrote a couple custom rollup plugins to do various generated code translations 'before' typescript (which we use the rollup typescript plugin to do). I suppose we could un-rollup the ractive template build step, but its so close to being able to watch our source code and generate the bundled output, cradle to grave. The only thing that seems to not be working is that the ractive template rollup plugin writes output files successfully on the input files changing, but even though it goes 'before' typescript in the plugin order, the updated files are not present by the time typescript plugin runs. My guess is that you generate and write the output view files to disk asynchronously and therefore they are not available to the next plugin by the time its invoked in the chain. Would it be possible to change that? Its nice that there is this plugin to rollup that can piggy back on the file watching and generate output, but if its not guaranteed as input to the next step in the rollup chain, it doesn't work quite right. I think when I was reviewing the typescript rollup plugin some plugins will generate 'virtual' output that can be passed on to the next plugin (essentially an in-memory file), so at least if that could be returned to the rollup handler when it goes to 'look' for the generated file that would fix it, even if the files won't be flushed to disk until later. |
Beta Was this translation helpful? Give feedback.
-
Here's the process that I use to build my views incrementally in my larger projects:
views
directory and spits out ts modules in a gitignored build directory. The script backgrounds this process.tsc
in watch mode on the client source and the view output directory, which is separate. This is also backgrounded.Here's the nodemon watcher:
Beta Was this translation helpful? Give feedback.
All reactions