This would be the most elegant solution if you’re comfortable handling Webpack yourself, and leaving the bounds of the CLI itself. , // make sure you install the loaders for your project! npm i -D apply-loader pug-loader As you saw in chapter 3, Pug templates use the concept of extendable layouts, enabling you to define this type of repeatable structure once in a layout file. But for a lot of users, people want to stay within the comforts of the CLI.Īfter ejecting, just look for rules: [ within the ejected nfig file, and add this in the rules array. So another option is that you could ng eject your Webpack configuration from the CLI, and simply add the pug rule yourself. That works great with AoT, but you’ll find ng serve doesn’t work anymore. pug.ts TypeScript file string, and you import that result.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |