About module entry es folder usage
See original GitHub issueWhat problem does this feature solve?
So now we use babel-plugin-import
to reduce bundle size. The pkg.main
and pkg.module
entry all point warn.js
. There is no way import es6 module.
What does the proposed API look like?
Consider change pkg.module: es
? But I’m not sure if work as expect.
pkg.module
for rollup or webpack tree shaking. Webpack only bundle referencedd components if correct config. /es/warn.js
is useless.
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (21 by maintainers)
Top Results From Across the Web
The JavaScript Modules Handbook – Complete Guide to ES ...
Follow the steps below to learn how to use an ES module. Step 1: Create a project directory. Create a project folder—where this...
Read more >Using ES modules in Node.js - LogRocket Blog
Package entry points Module files within packages can be accessed by appending a path to the package name. Another way is if the...
Read more >ES modules: A cartoon deep-dive - Mozilla Hacks - the Web ...
The way this works is that any file loaded using import() is handled as the entry point to a separate graph.
Read more >Entry and Context - webpack
The base directory, an absolute path, for resolving entry points and loaders from the configuration. const path = require('path'); module.
Read more >ES modules not supported · Issue #1291 · vercel/pkg - GitHub
assume dhjaks is subfolder under pacakge file parent folder. use build command ... module input with a single change), and bytecode generation that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
痛点少一个是一个!
My point is
npm i antd-mobile
then enjoy it.砍掉所有入门的门槛,这些门槛其实都属于高级用法,非必选。
babel-plugin-import
打包会大,但是能运行啊,配置对 webpack tree shaking 就行,lodash
也不小,可是人家并没有要求用户一定要装babel-plugin-lodash
,用户想减小打包体积可以深入探索。nprogress.hd.css
。(这个已经积重难返了)svg-sprite-loader
没问题啊,Icon 默认改成<Icon src='//cdn.com/xxx.svg' />
或者<Icon src='base64 data uri' />
,要使用 type 属性这种高级用法的时候才需要配置svg-sprite-loader
。(这个可能还可以抢救一下)以上是我认为这个项目目前的四大痛点。
目前的状况是用户想尝试一下,安装以后配置半天还不一定成功,少部分不肯放弃的人跑到这里开 issus 也未必找到解决办法。
close since antd-mobile@2.0 have unlocked this restriction.
https://github.com/ant-design/ant-design-mobile/blob/master/package.json#L31