First, an exercise. Can we represent all of css with plain data? Let's try.
let redText = { color: 'red' };
/* | |
html-webpack-plugin-lite | |
Usage: | |
new HtmlWebpackPluginLite({ | |
title: "Webpack demo", // Available in context | |
template: ({ css, js, title }) => ... html ... | |
}), | |
*/ |
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |