A simple scaffolding based on stu’s lightweight MVVM framework avalon2.0.
The scaffolding is modified based on Wukong scaffolding of Mobx-React.
Avalon2.0 + WebPack2 + mmRouter + HMR + DLL + happypack configuration.
Supports package preview, package performance analysis, automatic webpage generation for performance analysis, and DLL file optimization.
The following compatibility issues with IE9 are not currently considered. Once conniving is better than cutting.
webpack command
- NPM start running
- NPM Run Build production environment package
- NPM run DLL Run DLL configuration file, a DLL package
- NPM run redll deletes existing DLL files and repackages them
- NPM run Deploy specifies the package that can be published. You are advised to use this package when online
- NPM run Preview previews the package effect, requires CD./dist to execute.
git clone https://....
cnpm install | npm install...
npm run redll
Copy the code
todos list
- The mobile terminal
- Compatibility with IE9 below (do not want to do)
- Join the status manager
- Perfect a complex demo
- .
Because of the DLL configuration optimization, you need to manually copy build/dist/vendor.js to the dist/static/. You also need to modify the reference address of the entry file index. HTML.
<script type="text/javascript" SRC ="/build/dist/vendor.js"></script> <script type="text/javascript" src="/static/dist/vendor.js"></script>
Copy the code
thanks
author
The project continues to update…