This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const webpack = require("webpack"); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const isDev = true; | |
const isHmr = process.env.NODE_ENV === "hmr"; | |
module.exports = { | |
devtool: "inline-source-map", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
optimization: { | |
splitChunks: { | |
cacheGroups: { | |
vendor: { | |
name: 'vendor', | |
test: /[\\/]node_modules[\\/]/, | |
chunks: 'all', | |
maxSize: 500000 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const yoConfig = { | |
"webpack-cli": { | |
"configuration": { | |
"config": { | |
"merge": "okay", | |
"topScope": [ | |
"const webpack = require('webpack')", | |
"const path = require('path')", | |
"\n", | |
"/*\n * SplitChunksPlugin is enabled by default and replaced\n * deprecated CommonsChunkPlugin. It automatically identifies modules which\n * should be splitted of chunk by heuristics using module duplication count and\n * module category (i. e. node_modules). And splits the chunks…\n *\n * It is safe to remove \"splitChunks\" from the generated configuration\n * and was added as an educational example.\n *\n * https://webpack.js.org/plugins/split-chunks-plugin/\n *\n */", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
T="$(date +%s)" | |
cd esm | |
npm run test | |
T="$(($(date +%s)-T))" | |
npm install --save v8-compile-cache | |
ex -sc '2i|require("v8-compile-cache")' -cx script/test.js | |
T2="$(date +%s)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get outer pID so we can exit it later | |
trap "exit 9" TERM | |
TOP_PID=$$ | |
# Get pID of chrome (requires you to have pidof on your computer) | |
# http://brewformulas.org/Pidof | |
PidName=`pidof chrome` | |
found=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
'./src/index' | |
], | |
output: { | |
path: path.join(__dirname, 'dist'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
'./src/index' | |
], | |
output: { | |
path: path.join(__dirname, 'dist'), |
NewerOlder