Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Mar 12, 2024
1 parent 18bbd51 commit 8d79a24
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"sideEffects": false,
"main": "index.js",
"module": "module.js",
"typings": "./dist/types/index.d.ts",
"typings": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"default": "./module.js"
},
"require": {
"types": "./dist/types/index.d.ts",
"types": "./dist/index.d.ts",
"default": "./index.js"
}
}
Expand Down
9 changes: 8 additions & 1 deletion packages/react/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import copy from 'rollup-plugin-copy';
import dts from 'rollup-plugin-dts';
import {
getBuildFormat,
getRollupTSConfig,
Expand All @@ -11,7 +12,6 @@ const buildType = isProductionBuild() ? '' : '-dev';

const external = [
'pixi.js',
'@pixi/react-invariant',
'lodash.isnil',
'lodash.times',
'prop-types',
Expand Down Expand Up @@ -58,4 +58,11 @@ else
);
}

builds.push({
// path to your declaration files root
input: './dist/types/index.d.ts',
output: [{ file: 'dist/index.d.ts', format: 'es' }],
plugins: [dts({ tsconfig: './tsconfig.types.json' })],
});

export default builds;
4 changes: 0 additions & 4 deletions shared/getRollupConfig.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import dts from 'rollup-plugin-dts';
import esbuild from 'rollup-plugin-esbuild';
import filesize from 'rollup-plugin-filesize';
import sourcemaps from 'rollup-plugin-sourcemaps';
Expand Down Expand Up @@ -33,9 +32,6 @@ export function getRollupTSConfig(dest, format, merge = {})
preferBuiltins: false,
mainFields: ['main', 'jsnext'],
}),
dts({
tsconfig: 'tsconfig.types.json',
}),
esbuild({
exclude: '**/node_modules/**',
target: 'es2017',
Expand Down

0 comments on commit 8d79a24

Please sign in to comment.