@kokojs/plugin-vue
TypeScript icon, indicating that this package has built-in type declarations

3.33.13 • Public • Published

Vue 插件

@kokojs/plugin-vue 提供了编译 .vue 单文件组件的能力,并内置 Vue 基础 DLL。

安装

yarn add @kokojs/plugin-vue --dev

安装完成后,在 koko.config.js 中添加如下配置:

module.exports = {
  plugins: {
    vue: {},
  },
};

内置 DLL

Vue 插件内置的 DLL 中包含了以下内容:

  • vue
  • vuex
  • vue-router
  • vue-lazyload

Tips: 如果项目中没有安装上述的库,他们将不会被打包进 DLL 中。

DLL 缓存

koko-plugin-vue 开启了 DLL 缓存的功能,并将依赖库的版本号作为 cacheKey,依赖库的版本号未变化时,会直接使用上次构建的 DLL 缓存结果。

配置项

dll

  • Type: boolean
  • Default: true

是否需要构建内置 DLL,如果设置为 false,将不会生成 Framework DLL

module.exports = {
  plugins: {
    vue: {
      dll: false,
    },
  },
};

维护者

陈嘉涵。

Readme

Keywords

none

Package Sidebar

Install

npm i @kokojs/plugin-vue

Weekly Downloads

9

Version

3.33.13

License

MIT

Unpacked Size

3.22 kB

Total Files

6

Last publish

Collaborators

  • zhangguangyi
  • landluck
  • youzan_npm_platform
  • chenjiahan