tjx666 / awesome-chrome-extension-boilerplate

Use react + typescript + webpack to enhance your chrome extension development experience
MIT License
405 stars 45 forks source link

Manifest V3 Plan #34

Open tjx666 opened 1 year ago

tjx666 commented 1 year ago

代码分支 manifest-v3

欢迎试用反馈。

no13bus commented 1 year ago

你好。感谢作者写了这么好的项目。

我在这个v3的模版项目上面的src中增加 utils文件夹,然后在all/index.tsx中引入的时候,想用 @ 符号指代 src文件夹(因为看到项目的webpack做了这个设置),但是这么写是无效的,提示找不到utils module。

另外我发现 background 里面的文件是不会热加载的,是这样吗?

tjx666 commented 1 year ago

@no13bus

tsconfig.json 有没有配置 pathMapping:

image
tjx666 commented 1 year ago

@no13bus

另外我发现 background 里面的文件是不会热加载的,是这样吗?

是的,service worker 热更新不了,必须得重载插件

no13bus commented 1 year ago

@no13bus

tsconfig.json 有没有配置 pathMapping:

image

好了。确实没加这个配置

no13bus commented 1 year ago

hi, 还有个问题。我用pnpm安装新的模块的时候,报了个warn,不知道是啥原因. 我记得之前我没安装stable这个包,并且我要安装的包里面也没有这个东西。我是个后端,这块还不是太清楚。

❯ pnpm install get-selection-more
 WARN  deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
Packages: +1
+
Progress: resolved 1175, reused 1159, downloaded 0, added 1, done

dependencies:
+ get-selection-more 1.1.0

 WARN  Issues with peer dependencies found
.
├─┬ postcss-less 6.0.0
│ └── ✕ missing peer postcss@^8.3.5
└─┬ postcss-scss 4.0.5
  └── ✕ missing peer postcss@^8.3.3
Peer dependencies that should be installed:
  postcss@">=8.3.5 <9.0.0"

Done in 2.4s
❯ pnpm start
tjx666 commented 1 year ago

@no13bus 你可以用 pnpm why xxx 查看 xxx 是为什么被安装了,warning 其实不影响项目运行哈,很多 warning 你是没法结果的,它上游不更新你有啥办法。

no13bus commented 1 year ago

@no13bus 你可以用 pnpm why xxx 查看 xxx 是为什么被安装了,warning 其实不影响项目运行哈,很多 warning 你是没法结果的,它上游不更新你有啥办法。

明白了。之前写java的时候没遇到这种问题。看来还是前端技术发展太快了。再次感谢。