Skip to content

本项目演示如何使用 require.context 实现自动注册路由

License

Notifications You must be signed in to change notification settings

zy54321/demo-require-context

Repository files navigation

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.

About

本项目演示如何使用 require.context 实现自动注册路由

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published