- 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.
{ | |
"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" | |
}, |
yarn
yarn build:notruntime > path/to/file
It will be clear to understand the flow of webpack.
import("./abc.js").then(abc => abc.doIt()); |
import("./abc.js").then(abc => abc.doIt()); |
import(/* webpackChunkName: "my-chunk-name" */ 'module'); |
const createClass = () => { | |
return class { | |
constructor(options) { this.options = options || {}; } | |
}; | |
} | |
const Plugin = (x) => ( | |
return { | |
map: f => Plugin(f(x)), |
const MODULE_DIR = /(.*([\/\\]node_modules|\.\.)[\/\\](@[^\/\\]+[\/\\])?[^\/\\]+)([\/\\].*)?$/g; | |
{ | |
loader: 'babel-loader', | |
test: /\.jsx?$/, | |
include(filepath) { | |
if (filepath.split(/[/\\]/).indexOf('node_modules')===-1) return true; | |
let pkg, manifest = path.resolve(filepath.replace(MODULE_DIR, '$1'), 'package.json'); | |
try { pkg = JSON.parse(fs.readFileSync(manifest)); } catch (e) {} | |
return !!(pkg.modules || pkg['jsnext:main']); |
import {DomEventsPlugin} from 'angular2/platform/common_dom'; | |
// Have to pull DOM from src because platform/common_dom returns DOM as null. | |
// I believe its a TS bug. | |
import {DOM} from 'angular2/src/platform/dom/dom_adapter'; | |
import {Injectable} from 'angular2/core'; | |
import {noop} from 'angular2/src/facade/lang'; | |
@Injectable() | |
export class DOMOutsideEventPlugin extends DomEventsPlugin { | |
eventMap: Object = { |
import {bootstrap} from 'angular2/platform/browser'; | |
import {DIRECTIVES, PIPES, PROVIDERS, ENV_PROVIDERS, PLUGINS} from './platform/browser'; | |
import {App, APP_PROVIDERS} from './app'; | |
bootstrap(App, [ | |
...PROVIDERS, | |
...ENV_PROVIDERS, | |
...DIRECTIVES, | |
...PIPES, | |
...APP_PROVIDERS, |