Skip to content

Instantly share code, notes, and snippets.

@rch850
Last active March 2, 2017 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rch850/3cb88d1854ce9a89c8d6acb653f837a4 to your computer and use it in GitHub Desktop.
Save rch850/3cb88d1854ce9a89c8d6acb653f837a4 to your computer and use it in GitHub Desktop.
a patch for angular-cli to use pug
# patch angular-cli@1.0.0-rc.0 to use pug.
# see "Revisions" for older angular-cli.
# usage: patch -p0 < angular-cli-pug.patch
# npm install --save-dev apply-loader pug-loader
# source: https://github.com/angular/angular-cli/issues/1886#issuecomment-280923201
--- node_modules/@angular/cli/models/webpack-configs/common.js.orig 2017-02-25 16:30:09.000000000 +0900
+++ node_modules/@angular/cli/models/webpack-configs/common.js 2017-03-02 13:21:10.000000000 +0900
@@ -72,6 +72,7 @@ function getCommonConfig(wco) {
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader', exclude: [nodeModules] },
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.html$/, loader: 'raw-loader' },
+ { test: /\.pug$/, loader: 'apply-loader!pug-loader?self' },
{ test: /\.(eot|svg)$/, loader: `file-loader?name=[name]${hashFormat.file}.[ext]` },
{
test: /\.(jpg|png|gif|otf|ttf|woff|woff2|cur|ani)$/,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment