lavas-project / vue-skeleton-webpack-plugin

Lavas webpack plugin: skeleton solution for PWA webshell
886 stars 129 forks source link

请问路由支持hash模式吗 #37

Open xianga opened 6 years ago

confidencefnt commented 6 years ago

试过,支持

xiaoiver commented 6 years ago

@xianga 你是说为多个路由生成多个 Skeleton 这个功能吗? 是支持的,通过 router.mode 可以配置,默认是 history 模式,可以设置成 hash 模式。

new SkeletonWebpackPlugin({
      webpackConfig: require('./webpack.skeleton.conf'),
      quiet: true,
      minimize: true,
      router: {
        mode: 'hash', // hash 模式
        routes: [
          {
            path: '/page1',
            skeletonId: 'skeleton1'
            },
            {
              path: '/',
              skeletonId: 'skeleton2'
            },
        ]
      }
    }),

具体示例项目可以参考:Github 地址

whapply commented 5 years ago

@xiaoiver 请问在vue-cli3中 如何为多个路由生成多个 Skeleton

ReinhardChen93 commented 5 years ago

@xiaoiver 请问在vue-cli3中 如何为多个路由生成多个 Skeleton

是的 ,同问,cli3如何设置 多个Skeleton