G
G copied to clipboard
chore: optimizing the build toolchain
🤔 This is a ...
- [ ] New feature
- [ ] Bug fix
- [ ] Site / Document optimization
- [ ] TypeScript definition update
- [ ] Refactoring
- [ ] Performance improvement
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [x] Other (about what?)
🔗 Related issue link
see #1781 , etc.
💡 Background and solution
Adjust the rollup code compilation tool chain to babel, because babel has more refined control over the code than typescript and can correctly handle dependent sourcemaps.
Fix the code formatting conflict between eslint and prettier, and also solve the problem that all configuration rules of eslint are not really effective.
In summary, the above measures fix the following issues:
- Sourcemap can now be processed and generated correctly, and projects such as vite can parse correctly.
- ESLint and prettier can now work together normally to uniformly format the code.
In addition, by introducing some rollup plug-ins, we prepare for subsequent engineering optimization.
lock 文件要不从仓库去掉?
lock 文件要不从仓库去掉?
是遇到什么问题了么?
vite 的 sourcemap 没有生效是什么原因
vite 的 sourcemap 没有生效是什么原因
tsconfig 的配置不太对,以及 tsc 只支持处理包源码的 sourcemap,会直接忽略包依赖的 sourcemap,导致生成的 sourcemap 异常,除非将 src(或编译后的产物)也发布到 npm 才可以
tsconfig 的配置不太对,以及 tsc 只支持处理包源码的 sourcemap,会直接忽略包依赖的 sourcemap,导致生成的 sourcemap 异常,除非将 src(或编译后的产物)也发布到 npm 才可以
现在是把 src 发布到 npm 吗
tsconfig 的配置不太对,以及 tsc 只支持处理包源码的 sourcemap,会直接忽略包依赖的 sourcemap,导致生成的 sourcemap 异常,除非将 src(或编译后的产物)也发布到 npm 才可以
现在是把 src 发布到 npm 吗
没有,只会发布 dist 目录,即打包后的单文件,不发布编译 src(或编译后产生的 js 源代码)的目录