This script helps you start your development by opening your project in vscode, its github repository and optionally slack.
work react
| 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", |
| module.exports = { | |
| optimization: { | |
| splitChunks: { | |
| cacheGroups: { | |
| vendor: { | |
| name: 'vendor', | |
| test: /[\\/]node_modules[\\/]/, | |
| chunks: 'all', | |
| maxSize: 500000 | |
| }, |
| 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 */", |
| #!/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)" |
| # 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 |
| var path = require('path'); | |
| var webpack = require('webpack'); | |
| module.exports = { | |
| devtool: 'eval', | |
| entry: [ | |
| './src/index' | |
| ], | |
| output: { | |
| path: path.join(__dirname, 'dist'), |
| var path = require('path'); | |
| var webpack = require('webpack'); | |
| module.exports = { | |
| devtool: 'eval', | |
| entry: [ | |
| './src/index' | |
| ], | |
| output: { | |
| path: path.join(__dirname, 'dist'), |