alloc / alloc/vite-dts

Generates JS files inside src folder.

オープン
#11 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
87
フォーク
12
PR マージ指標
30日以内にマージされた PR はありません

説明

```
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-dts';
import { resolve } from 'path';
import Icons from 'unplugin-icons/vite';

export default defineConfig({
plugins: [
dts(),
Icons(),
react({
babel: {
plugins: ['macros']
}
})
],
build: {
lib: {
entry: resolve('src', 'App.tsx'),
formats: ['es'],
name: 'labour-rates-generic',
fileName: (format) => `labour-rates-generic.${format}.js` //put the name of your lib
},
rollupOptions: {
external: ['react', 'react-dom']
}
}
});

```

Trying to use dts, but the output generates js files inside the src folder. Maybe I'm doing something wrong.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。