解决screenfull插件加载报错

发布时间 2023-05-02 03:19:22作者: 南柯Dream丶

screenfull插件加载报错

Failed to compile.

./node_modules/screenfull/index.js 59:42
Module parse failed: Unexpected token (59:42)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| 
| 	for (const methodList of methodMap) {
> 		const exitFullscreenMethod = methodList?.[1];
| 		if (exitFullscreenMethod in document) {
| 			for (const [index, method] of methodList.entries()) {

在vue.config.json添加 重启项目

 module.exports = {
// code
transpileDependencies: ['screenfull']
// code }