ElemeFE / page-skeleton-webpack-plugin

Webpack plugin to generate the skeleton page automatically
MIT License
2.8k stars 394 forks source link

API schema 匹配不上 #91

Open Veath opened 5 years ago

Veath commented 5 years ago

Description

预览页面需要登录态(sessionStorage)

Steps to reproduce

1、配置webpack-config.js 2、SkeletonPlugin添加sessionStoragies 3、npm run dev

Actual behavior: [What actually happened] 报错! page-skeleton-webpack-plugin has been initialised using a configuration object that does not match the API schema

Plugin configration

for example:

new SkeletonPlugin({
  pathname: path.resolve(__dirname, `./src`),
  port: '7890',
  loading: 'spin',
  svg: {
    color: '#EFEFEF',
    shape: 'circle',
    shapeOpposite: ['.red']
  },
  image: {
    shape: 'rect', // `rect` | `circle`
    color: '#EFEFEF',
    shapeOpposite: ['.white']
  },
  pseudo: {
    color: '#EFEFEF', // or transparent
    shape: 'circle', // circle | rect
    shapeOpposite: ['.apple', '.pen']
  },
  button: {
    color: '#EFEFEF',
    excludes: ['.center a']
  },
  defer: 5000,
  excludes: [],
  remove: [],
  hide: ['.ag-text', '.ag-image'],
  grayBlock: ['#header'],
  cssUnit: 'vw',
  cookies: [{
    name: 'SID',
    value: 'xxxxxx',
    url: 'https://xx.xxx.xx'
  }, {
    name: 'USERID',
    value: 'xxxxxx',
    url: 'https://xx.xxx.xx'
  }],
 sessionStoragies: {
  a: 1
  }
})

Versions

Veath commented 5 years ago

config/optionsSchema.json npm和github代码对不上

younth commented 5 years ago

+1

hello-hyh commented 5 years ago

In node_modules/page-skeleton-webpack-plugin/src/config/optionsSchema.json cannot found storagies and sessionStoragies field, but in this project has them.