Skip to content

Instantly share code, notes, and snippets.

View chrisalexander55's full-sized avatar

Chris Alexander chrisalexander55

  • NJ, USA
View GitHub Profile
@chrisalexander55
chrisalexander55 / dev.config.js
Last active September 2, 2017 19:08
dev.config.js - Webpack Subdirectory Bundle Injection Silently Fails
const path = require('path');
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const webpackCommon = require('./dev.common.config');
const env = require('../env');
const proxyRules = require('../src/app/js/shared/proxy/config');
// webpack plugins
const HtmlWebpackPlugin = require('html-webpack-plugin');
@chrisalexander55
chrisalexander55 / dev.common.config.js
Created September 2, 2017 19:12
dev.common.config.js - Webpack Subdirectory Bundle Injection Silently Fails
const path = require('path');
const Webpack = require('webpack');
// webpack plugins
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
module.exports = {
entry: {
'js/vendor': './src/app/js/vendor.js',
@chrisalexander55
chrisalexander55 / index.html
Created September 3, 2017 02:55
index.html - wrong script paths
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta http-equiv="Strict-Transport-Security" content="max-age=63072000">
<meta http-equiv="X-Content-Type-Options" content="nosniff">
<meta http-equiv="Window-Target" content="_value">
@chrisalexander55
chrisalexander55 / some-page-1.html
Created September 3, 2017 02:59
pages/some-page-1.html - correct script paths
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta http-equiv="Strict-Transport-Security" content="max-age=63072000">
<meta http-equiv="X-Content-Type-Options" content="nosniff">
<meta http-equiv="Window-Target" content="_value">
@chrisalexander55
chrisalexander55 / webpack-plugin-config-bootstrap-4
Last active September 16, 2017 16:36
Webpack Plugin Config for Bootstrap 4
Took me 10 minutes to find how to configure Webpack's plugin system to leverage Bootstrap 4.
Also see my other Gist for [installing and configuring Bootstrap 4](https://gist.github.com/chrisalexander55/81f3d5db057fbcbd74d62d488adbca8a).
```
plugins: [
new Webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Popper: ['popper.js', 'default'],
@chrisalexander55
chrisalexander55 / bootstrap-4-webpack-config.md
Last active September 29, 2017 18:27
Subtle Tweak to get Boostrap 4 Working With Webpack

Although I followed the excellent directions provided by the Boostrap 4 documentation, I found it incomplete. Here are the missing steps:

# install dependencies
npm i jquery popper.js bootstrap@4.0.0-beta --save

# install dev-dependencies
npm i precss --save-dev

# use the following webpack postcss-loader config
@chrisalexander55
chrisalexander55 / macos-new-development-environment.txt
Last active October 2, 2021 21:02
MacOS New Development Environment
####
MacOS
####
# Although configured against Big Sur, should be backward compatible
# Make sure you have installed the latest MacOS security patches before continuing
####
XCode
####
# Install XCode, messing with XCode CMD Tools can be sloppy; take the 1.2Gb loss now :(