Skip to content

Commit

Permalink
fix: remove terser for now to fix sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mason committed Apr 14, 2024
1 parent 432252a commit ff05f40
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 196 deletions.
2 changes: 0 additions & 2 deletions packages/react-three-jolt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@
"@react-three/test-renderer": "^8.2.1",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/three": "^0.163.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^7.5.0",
"@vitest/coverage-v8": "^1.4.0",
"babel-loader": "^9.1.3",
"eslint": "^9.0.0",
"happy-dom": "^14.7.0",
"prettier": "^3.1.0",
Expand Down
20 changes: 11 additions & 9 deletions packages/react-three-jolt/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import path from 'path';
import filesize from 'rollup-plugin-filesize';

const external = [
'jolt-physics',
'@react-three/fiber',
'@react-three/drei',
'three',
'react',
'react-dom'
];

export default [
{
input: `./src/index.ts`,
external: ['@react-three/fiber', 'three', 'react', 'react-dom', 'jolt-physics'],
inlineDynamicImports: true, // Add this line
external,
output: [
{
file: `dist/index.mjs`,
//dir: 'dist',
format: 'es',
sourcemap: true,
exports: 'named'
},
{
file: `dist/index.cjs`,
//dir: 'dist',
format: 'cjs',
sourcemap: true,
exports: 'named'
}
],
plugins: [
terser(),
nodeResolve(),
commonjs(),
typescript({
tsconfig: path.resolve(`tsconfig.json`),
sourceMap: true,
inlineSources: true
tsconfig: path.resolve('tsconfig.json')
}),
filesize()
],
Expand Down
Loading

0 comments on commit ff05f40

Please sign in to comment.