Skip to content

Latest commit

 

History

History
40 lines (23 loc) · 1.39 KB

README.md

File metadata and controls

40 lines (23 loc) · 1.39 KB

demo-require-context

本项目演示 require.context 如何帮助开发者更方便地开发 vue 项目

示例的自动注册路由方法在实际项目中可能并没有太大的实用性,依项目复杂度而定

另一个关于 require.context 的示例 d2admin 的自动注册 svg 图标到图标组件功能

demo 只作为抛砖引玉,欢迎大家补充

preview

index

user

pages

error

mixin

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

For a detailed explanation on how things work, check out the guide and docs for vue-loader.