Skip to content

Instantly share code, notes, and snippets.

View thomasJang's full-sized avatar
🎯
Focusing

JANG KI-YOUNG thomasJang

🎯
Focusing
View GitHub Profile
...
var CompressionPlugin = require("compression-webpack-plugin");
...
let config = {
entry: path.join(__dirname, '../app/index'),
cache: false,
devtool: 'cheap-module-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
@JamesMessinger
JamesMessinger / IndexedDB101.js
Last active October 16, 2024 09:40
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@Fusselwurm
Fusselwurm / querySelector.js
Created January 30, 2013 14:39
document.querySelector, document.querySelectorAll for IE7
/*global document */
/**
* define document.querySelector & document.querySelectorAll for IE7
*
* A not very fast but small hack. The approach is taken from
* http://weblogs.asp.net/bleroy/archive/2009/08/31/queryselectorall-on-old-ie-versions-something-that-doesn-t-work.aspx
*
*/
(function () {
var