- copy tapable.log.js code into your tapable node module
- git clone https://github.com/if12/webpack-travel
yarnyarn 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" |
yarnyarn build:notruntime > path/to/fileIt will be clear to understand the flow of webpack.
| 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']); |
| <script type="text/ng-template" id="one.html"> | |
| <div>This is first template</div> | |
| </script> | |
| <script type="text/ng-template" id="two.html"> | |
| <div>This is second template</div> | |
| </script> |