webpack——The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)

简介: webpack——The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)

前言

在搏皮中通过动态的引入CDN资源,来减少搏皮制品的大小,但是webpack没有开启topLevelAwait所以产生了报错;

experiments: https://webpack.docschina.org/configuration/experiments/

内容

!> 实验特性

const json5 = require('json5')
const miniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = {
    entry: './src/main.js',
    experiments: {
        topLevelAwait: true,
    },
}

学无止境,谦卑而行.

目录
相关文章
webpack.config.js配置文件报错:The ‘mode‘ option has not been set
webpack.config.js配置文件报错:The ‘mode‘ option has not been set
235 0
|
Linux iOS开发 MacOS
pnpm全局安装报错:Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PN
pnpm全局安装报错:Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PN
3704 0
husky——The '.husky/pre-commit' hook was ignored because it's not set as executable
husky——The '.husky/pre-commit' hook was ignored because it's not set as executable
209 1
|
Java 应用服务中间件 Python
Refused to display 'xxx' in a frame ,because it set 'X-Frame-Options' to 'deny'.
我本是在DJANGO页面的iframe里嵌入springboot的页面。 当报了这个错误之后,我花了时间在nginx和django上, 后来才改变解决思路,从springboot出发,解决问题。
6206 0
|
JavaScript 前端开发
.bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your op..
.bezierEasingMixin(); ^ Inline JavaScript is not enabled. Is it set in your op..
322 0
|
应用服务中间件 Linux BI
Tomcat部署iframe出现Refused to display ‘url‘ in a frame because it set ‘X-Frame-Options‘ to ‘deny‘无法访问问题
Tomcat部署iframe出现Refused to display ‘url‘ in a frame because it set ‘X-Frame-Options‘ to ‘deny‘无法访问问题
1309 0
Tomcat部署iframe出现Refused to display ‘url‘ in a frame because it set ‘X-Frame-Options‘ to ‘deny‘无法访问问题
|
1月前
|
存储 JavaScript Java
(Python基础)新时代语言!一起学习Python吧!(四):dict字典和set类型;切片类型、列表生成式;map和reduce迭代器;filter过滤函数、sorted排序函数;lambda函数
dict字典 Python内置了字典:dict的支持,dict全称dictionary,在其他语言中也称为map,使用键-值(key-value)存储,具有极快的查找速度。 我们可以通过声明JS对象一样的方式声明dict
139 1
|
4月前
|
存储 缓存 JavaScript
Set和Map有什么区别?
Set和Map有什么区别?
368 1
|
30天前
|
存储 算法 容器
set_map的实现+set/map加持秒杀高频算法题锻炼算法思维
`set`基于红黑树实现,支持有序存储、自动去重,增删查效率为O(logN)。通过仿函数可自定义排序规则,配合空间配置器灵活管理内存。不支持修改元素值,迭代器失效需注意。`multiset`允许重复元素。常用于去重、排序及查找场景。