Open weihongyu12 opened 6 years ago
The page-skeleton-webpack-plugin was installed and configured using the project generated by the @vue/cli 3.0 scaffold, but the skeleton screen could not be generated when the project was run.
page-skeleton-webpack-plugin
@vue/cli 3.0
使用@vue/cli 3.0脚手架生成的项目,安装并配置了page-skeleton-webpack-plugin,但是在运行项目时无法生成skeleton screen
vue/cli 3.0
vue.config.js
-
Expected behavior:
Correct generation of skeleton screen.
正确的生成skeleton screen
Actual behavior:
An error message 😭 -> "[PSG] generate is not a function" has occurred and the debug skeleton screen cannot be previewed.
出现了错误提示😭 -> "[PSG] generate is not a function",无法预览调试skeleton screen
const path = require('path'); const { SkeletonPlugin } = require('page-skeleton-webpack-plugin'); module.exports = { crossorigin: 'anonymous', integrity: true, configureWebpack: { plugins: [ new SkeletonPlugin({ pathname: path.resolve(__dirname, './shell'), staticDir: path.resolve(__dirname, './dist'), routes: ['/'], }), ], }, };
一样的环境,一样的问题
我也是同样的问题
我也碰到了,难道cli3还不支持吗?
解决了么??
css-tree版本太低,升级一下 npm i css-tree@1.0.0-alpha.29 就可以了
Description
The
page-skeleton-webpack-plugin
was installed and configured using the project generated by the@vue/cli 3.0
scaffold, but the skeleton screen could not be generated when the project was run.使用
@vue/cli 3.0
脚手架生成的项目,安装并配置了page-skeleton-webpack-plugin
,但是在运行项目时无法生成skeleton screenSteps to reproduce
vue/cli 3.0
page-skeleton-webpack-plugin
and configure it invue.config.js
-
vue/cli 3.0
生成项目page-skeleton-webpack-plugin
,并在vue.config.js
进行相应的配置Expected behavior:
Correct generation of skeleton screen.
正确的生成skeleton screen
Actual behavior:
An error message 😭 -> "[PSG] generate is not a function" has occurred and the debug skeleton screen cannot be previewed.
出现了错误提示😭 -> "[PSG] generate is not a function",无法预览调试skeleton screen
Plugin configration
Versions