相关文章推荐
玩足球的树叶  ·  Django——DRF 登录 注册 - ...·  1 年前    · 
逃课的蚂蚁  ·  如何从ITK配准中获得变换仿射?-腾讯云开发 ...·  2 年前    · 
暗恋学妹的煎鸡蛋  ·  python--日志处理logging.ha ...·  2 年前    · 
无邪的八宝粥  ·  看懂SqlServer查询计划 - ...·  2 年前    · 
文武双全的圣诞树  ·  基于机器学习方法的自动缺血性卒中亚型,IEE ...·  2 年前    · 
Code  ›  NPM package Include dist/index.js only_dist目录下的index.min.js 引入
https://blog.csdn.net/ericspiPb/article/details/132157472
机灵的烤地瓜
7 月前

Problem

I have follow package.json looks good in npm. However, I figure out there is problem.

"name": "@scope/package", "version": "0.1.4", "main": "dist/index.js", "types": "dist/index.d.ts",

The distributed package only includes index.js !

After several research. There is some finding, npm. will looking for .gitignore if .npmignore not found.

To Fix It

Add files array with dist folder

  "name": "@scope/package",
  "version": "0.1.4",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "files": [
     "dist"

Finally

 
推荐文章
玩足球的树叶  ·  Django——DRF 登录 注册 - .笨蛋小韩 - 博客园
1 年前
逃课的蚂蚁  ·  如何从ITK配准中获得变换仿射?-腾讯云开发者社区-腾讯云
2 年前
暗恋学妹的煎鸡蛋  ·  python--日志处理logging.handlers.TimedRotatingFileHandler_晚风吹儿的博客-CSDN博客
2 年前
无邪的八宝粥  ·  看懂SqlServer查询计划 - Fish Li - 博客园
2 年前
文武双全的圣诞树  ·  基于机器学习方法的自动缺血性卒中亚型,IEEE Access - X-MOL
2 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号