Skip to content

Instantly share code, notes, and snippets.

View aaronfrost's full-sized avatar
:octocat:
Software Architect Contractor

Aaron Frost aaronfrost

:octocat:
Software Architect Contractor
View GitHub Profile
{
"extends": [
"tslint:latest",
"tslint-config-prettier",
],
}
// If [email protected]+
{
"extends": [
"tslint:latest",
"tslint-plugin-prettier"
],
"rules": {
"prettier": true
}
}
@aaronfrost
aaronfrost / webpack.partial.js
Created July 2, 2019 21:49
This is a webpack.partial.js for an Angular CLI project that needs to use ngAnnotate and angular template loader
const webpack = require('webpack');
module.exports = {
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules|src/,
use: [
{
const rules = config.module.rules;
// File the rules from the build that builds all the TS files. The MainRule
const mainRule = rules.find((r) => {
// If not in prod mode, this IF will find the mainRule
if (r.loader) {
return (
r && r.loader && r.loader.endsWith(angularLoaderFilename)
);