我修复了一部分问题。这是打字稿版本的问题,不知为什么我的版本package.json
不是好版本,所以我用好的版本代替。另外还有一个导入p5
问题,比如@ChristopherChiche 并且知道问题的大小export.js
现在大约是 8MG 而之前是 10K,并且索引没有导出:(
我认为在导出过程P5
中添加了,不确定但闻到了。如果是这样,如何不导出p5
,因为我不需要,因为在 html 中它是这样写的<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
链接项目:
https ://github.com/StanLepunK/P5JS_typeScript_webPack/tree/master/Template_V2
export.js 8.49 MiB 0 [emitted] [big] export
Entrypoint export [big] = export.js
[1] (webpack)/buildin/global.js 472 bytes {0} [built]
[2] ./src/sketch.ts + 1 modules 1.27 KiB {0} [built]
| ./src/sketch.ts 826 bytes [built]
| ./src/Z_Position.ts 468 bytes [built]
+ 1 hidden module
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
export.js (8.49 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
export (8.49 MiB)
export.js
WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/