- copy tapable.log.js code into your tapable node module
- git clone https://github.com/if12/webpack-travel
yarn
yarn build:notruntime > path/to/file
It will be clear to understand the flow of webpack.
import("./abc.js").then(abc => abc.doIt()); |
yarn
yarn build:notruntime > path/to/file
It will be clear to understand the flow of webpack.
#!/bin/bash | |
ARRAY=( | |
"webpack:webpack" | |
"webpack:example-app" | |
"webpack:enhanced-require" | |
"webpack:webpack-dev-middleware" | |
"webpack:enhanced-resolve" | |
"webpack:template" | |
"webpack:webpack-dev-server" |
#!/bin/bash | |
ARRAY=( | |
"webpack:webpack" | |
"webpack:example-app" | |
"webpack:enhanced-require" | |
"webpack:webpack-dev-middleware" | |
"webpack:enhanced-resolve" | |
"webpack:template" | |
"webpack:webpack-dev-server" |
{ | |
"errors": [], | |
"warnings": [], | |
"version": "3.6.0", | |
"hash": "87cd04b20883a998cc03", | |
"time": 283, | |
"publicPath": "", | |
"assetsByChunkName": { | |
"main": "main.chunk.js" | |
}, |
{ | |
"errors": [], | |
"warnings": [], | |
"version": "3.6.0", | |
"hash": "87cd04b20883a998cc03", | |
"time": 283, | |
"publicPath": "", | |
"assetsByChunkName": { | |
"main": "main.chunk.js" | |
}, |
const fs = require('fs'); | |
const path = require('path'); | |
const Benchmark = require('benchmark'); | |
const suite = new Benchmark.Suite; | |
const ts = require('typescript'); | |
const acorn = require('acorn'); | |
const babylon = require('babylon'); |
const chalk = require("chalk"); | |
const { performance } = require("perf_hooks"); | |
class ProfilingPlugin { | |
apply(compiler) { | |
// Compiler Hooks | |
Object.keys(compiler.hooks).forEach(hookName => { | |
compiler.hooks[hookName].intercept(makeInterceptorFor("Compiler")(hookName)) | |
}); | |
Object.keys(compiler.resolverFactory.hooks).forEach(hookName => { |
import PaintModule from "./somePaintModule.js"; | |
/** | |
* if user wanted to code split they pass | |
* const PaintModule = () => import("./somePaintModule.js") | |
*/ | |
CSS.paintWorklet.addModule(PaintModule) | |
// Therefore the surface api operates the same in the users eyes |
const pluginMeta = { name: "BomPlugin" }; | |
class BomPlugin { | |
constructor(encoding = "\ufeff") { | |
this.encoding = encoding; | |
} | |
apply(/** @type {import("webpack/lib/Compiler")}*/ compiler) { | |
compiler.hooks.compilation.tap(pluginMeta, ( | |
/** @type {import("webpack/lib/Compilation")}*/ compilation, | |
params |