@zbanx/umi-plugin-cookies

1.1.1 • Public • Published

@zbanx/umi-plugin-cookies

@zbanx/umi-plugin-cookies.

Install

Using npm:

$ npm install --save-dev @zbanx/umi-plugin-cookies

or using yarn:

$ yarn add @zbanx/umi-plugin-cookies --dev

配置

可配置项

export default {
  cookies: {
    // 跳过的域名列表
    skipDomains: ['local.tbanx.cn'],

    // 自动设置 Cookie: testKey=testValue
    testKey: 'testValue',
  },
}

或者在 .umirc.ts 里配置:

export default defineConfig({
  nodeModulesTransform: {
    type: 'none',
  },
  routes: [
    { path: '/', component: '@/pages/index' },
  ],
  fastRefresh: {},
  cookies: {
    skipDomains: ['local.tbanx.cn'],
    testKey: 'testValue',
  },
});

本地调试

npm link

在项目中调试

需要在项目package.json中添加开发依赖

{
  "devDependencies": {
    "@zbanx/umi-plugin-cookies": "latest"
  }
}
npm link @zbanx/umi-plugin-cookies
npm run dev

Readme

Keywords

none

Package Sidebar

Install

npm i @zbanx/umi-plugin-cookies

Weekly Downloads

4

Version

1.1.1

License

none

Unpacked Size

3.23 kB

Total Files

3

Last publish

Collaborators

  • www1721436982
  • windzb
  • john-yuan
  • cheng.luo