fix: package exports using api extractor
This PR using latest vite-plugin-dts and using @microsoft/api-extractor (rollupTypes: true) to generate only 1 dts, 1 js and 1 cjs files.
Right now WebStorm/IntelliJ intellisense not working, VSCode autocompletion working fine.
We will need to add some stuff in the build for JetBrains IDE.
NOTE: missing three and postprocessing dependencies in the plyaground, it is working fine, no need to change anything in the sfc files.
Looks like latest dts plugin will require moving script lang stuff to sfc script, some components will require to create a ts module since it is exporting some symbols (for example EffectComposer sfc) and sfc script cannot export ts modules (no idea if it will fail on build time, the error comes from eslint):
ESLint error
Without changing Pixelation sfc, VSCode not showing auto completion, you can revert the changes, rebuild the package and the tgz and use this playground: https://github.com/userquin/tresjs-post-processing-playground
From this PR from root folder:
nr build && pnpm pack
then in the playground
pnpm remove @tresjs/post-processing
// override tgz
// rm -rf ./tresjs-post-processing-2.0.0.tgz
// cp -p <path-to-pr-folder>/tresjs-post-processing-2.0.0.tgz .
cp -rf <path-to-pr-folder>/tresjs-post-processing-2.0.0.tgz .
pnpm add ./tresjs-post-processing-2.0.0.tgz
Looks like current version (main) works fine in VSCode:
-
rollupTypesis breaking stuff for webstorm - without
rollupTypes, types are broken for node16
We should move this package to ESM only and removing node10 types support. If you check the tsconfig files in my playground we only use Bundler (you can use pnpm create vite + vue/vue-ts...)
I'm going to prepare a PR for ESM only (or maybe here, there is no way to fix node16 types without rollupTypes).
thx for the investigation @brc-dd