0.1.0 • Published 3 years ago

vrouter-module-plugin v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

vrouter-moudle-plugin

This plugin is based on vue and splits its router to achieve on-demand packaged runs

Used to indirectly deal with the problem of slow webpack hot updates when there are too many routes

Getting Started

To begin, you'll need to install vrouter-moudle-plugin:

npm install vrouter-moudle-plugin --save-dev

or

yarn add -D vrouter-moudle-plugin

or

pnpm add -D vrouter-moudle-plugin

Must

We need the following structure for the project directory

-- product name (Your project folder)
  -- src
    -- entry
      -- entry name (A page entry folder)
        -- router
          -- index.js (The route file for this entry)
    -- modules
      -- module.json (Module usage configuration)
      -- module name (A module folder)
        -- router.js (The module's route entry file)

Options

root

  • Type:
type root = string;
  • For Exmaple
const path = require('path');
const VrouteModulePlugin = require('vrouter-module-plugin')
// ....
plugins: [
  new VrouteModulePlugin({
    root: path.resolve('./src')
  })
]
// ....

Used to determine the root of this plugin.

0.1.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago