当前位置:网站首页>【常见问题】浏览器环境、node环境的模块化问题
【常见问题】浏览器环境、node环境的模块化问题
2022-06-30 03:26:00 【小管打天下】
浏览器环境不支持模块化语法,需要工具翻译(webpack)
node环境默认支持CommonJS,要想支持ES6 Module,就得到package.json 设置 type 为 module
ES6 module 只支持引入JS文件,不支持其它文件(webpack loader 可以,比如 css 文件可以通过 css-loader 引入)
边栏推荐
猜你喜欢

Mathematical solution of Joseph Ring

一篇文章带你入门vim

Tidb 6.0: rendre les GRT plus efficaces 丨 tidb Book Rush

The broadcast module code runs normally in autojs4.1.1, but an error is reported in pro7.0 (not resolved)

Use of Arthas
![[practical skills] how to write agile development documents](/img/38/4bab396891ce3cc42595ae8cfd45ce.png)
[practical skills] how to write agile development documents

mysql 主从数据库同步失败的原因

Auto. JS learning notes 16: save to the mobile phone by project, instead of saving a single JS file every time, which is convenient for debugging and packaging
![[qt] qmap usage details](/img/ee/6e71a3dc5b90d2d1b7f7d3f6b56221.png)
[qt] qmap usage details
![[ten minutes] manim installation 2022](/img/54/7b895d785c7866271f06ff49cb20aa.png)
[ten minutes] manim installation 2022
随机推荐
C # basic learning (XIII) | breakpoint debugging
C#【高级篇】 C# 接口(Interface)
Sorting method of administrative route code letter + number
JS cross reference
MySQL + JSON = King fried
unity input system 使用记录(实例版)
Principle of device driver
The broadcast module code runs normally in autojs4.1.1, but an error is reported in pro7.0 (not resolved)
MySQL extracts strings from table fields
专升本语文资源整理
[live broadcast notes 0629] Concurrent Programming II: lock
HOOK Native API
ZABBIX trigger explanation
[qt] qmap usage details
Realization of BFS in C language by storing adjacency matrix of graph
[ten minutes] manim installation 2022
Reasons for MySQL master-slave database synchronization failure
设备驱动程序的原理
[0x0] 校长留的开放问题作业
zabbix 触发器详解