Hi, I have a blog posts generated from .md to .html during webpack build. These are generated to dist/blogposts folder. Is there a way to load these .html files in Aurelia? At the moment I am trying just to display one (hardcoded file name) during au run --watch
Module not found: Error: Can't resolve '/01.html' in 'D:\web-app\src\pages\blog-article'
resolve '/01.html' in 'D:\web-app\src\pages\blog-article'
try alternate dist: /dist/native-modules/ in only request
With webpack, Aurelia v1 cannot dynamically load module at runtime. (You can do that with CLI bundler or dumber bundler, as they have an AMD loader at runtime). If you want to decouple blog post from your app, you probably should consider the AMD loader approach.
With webpack, you can statically bundle all the md files just like html files. Note Aurelia v1 requires html template wrapped inside <template> tag. We can use html-loader’s preprocessor to handle that.