ElemeFE / page-skeleton-webpack-plugin

Webpack plugin to generate the skeleton page automatically
MIT License
2.79k stars 393 forks source link

Error: ENOENT: no such file or directory, open 'F:\workspace - 副本\crm-front\web-app\shell\home.html' #121

Closed zhengyn0001 closed 5 years ago

zhengyn0001 commented 5 years ago

Description

[Description of the bug or feature]

Steps to reproduce

  1. [First step]
  2. [Second step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Link to an example: [If you're reporting a bug that's not reproducible, please try to reproduce it on JSFiddle, JS Bin, CodePen or a similar service and paste a link here]

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'
  }]
})

Versions

zhengyn0001 commented 5 years ago

configureWebpack: config => { config.plugins = [ new HtmlWebpackPlugin({ filename: 'index.html', template: 'public/index.html' }), new SkeletonPlugin({ pathname: resolve(./shell), // 用来存储 shell 文件的地址 staticDir: resolve('../docker/dist/static/app/'), // 最好和 output.path 相同 routes: ['/'] // 将需要生成骨架屏的路由添加到数组中 }), new VueLoaderPlugin() ]}

zhengyn0001 commented 5 years ago

他突然就可以运行了,一开始还是会出现这个错,可是会自动显示按钮