ElemeFE / ElemeFE/page-skeleton-webpack-plugin
请问vue-cli3如何配置按照方案,不好使?
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 388
- PR merge metrics
- No merged PRs in 30d
Description
### Description
- Building for production... ERROR PageSkeletonOptionsValidationError: Invalid configuration object. page-skeleton-webpack-plugin has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property 'storagies'. These properties are valid:
object { pathname?, staticDir?, routes?, port?, loading?, text?, image?, button?, svg?, pseudo?, device?, debug?, minify?, defer?, excludes?, remove?, hide?, grayBlock?, cookies?, headless?, cssUnit?, decimal?, logLevel?, logTime?, noInfo?, quiet? }
PageSkeletonOptionsValidationError: Invalid configuration object. page-skeleton-webpack-plugin has been initialised using a configuration object that does not match the API schema.
### Plugin configration
for example:
```javascript
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'
}]
})
```
### Versions
- Page Skeleton:
- Webpack:
Contributor guide
Research direction
Start with the reported PageSkeletonOptionsValidationError and the provided SkeletonPlugin configuration. Compare the failing configuration, especially the reported `storagies` property, with the valid schema properties shown in the error. Done means the Vue CLI 3 production build accepts the plugin configuration without this validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100