File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 " dist"
3333 ],
3434 "type" : " module" ,
35- "main" : " ./dist/src/ index.js" ,
35+ "main" : " ./dist/index.js" ,
3636 "exports" : {
3737 "." : {
38- "import" : " ./dist/src/ index.js" ,
38+ "import" : " ./dist/index.js" ,
3939 "types" : " ./dist/types/src/index.d.ts" ,
40- "default" : " ./dist/src/ index.js"
40+ "default" : " ./dist/index.js"
4141 },
4242 "./tokens.css" : " ./dist/tokens.css"
4343 },
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import commonjs from "@rollup/plugin-commonjs";
22import resolve from "@rollup/plugin-node-resolve" ;
33import terser from '@rollup/plugin-terser' ;
44import typescript from "@rollup/plugin-typescript" ;
5+ import path from 'path' ;
56import copy from "rollup-plugin-copy" ;
67import peerDepsExternal from "rollup-plugin-peer-deps-external" ;
78import preserveDirectives from "rollup-plugin-preserve-directives" ;
@@ -27,12 +28,24 @@ export default [{
2728 } ,
2829 ] ,
2930 external : ( id ) => {
30- // External: node_modules packages (but not our own source)
31- return / n o d e _ m o d u l e s / . test ( id ) && ! / ^ \. / . test ( id ) && ! / ^ \/ / . test ( id . replace ( / ^ [ A - Z ] : / , '' ) ) ;
31+ // Don't mark entry points or relative/absolute source paths as external
32+ if ( id . startsWith ( '.' ) || id . startsWith ( '/' ) || id . includes ( 'src/' ) ) {
33+ return false ;
34+ }
35+
36+ // Don't mark "src" alias as external
37+ if ( id === 'src' ) {
38+ return false ;
39+ }
40+ // Mark all other bare module names (like 'react', 'tslib') as external
41+ return true ;
3242 } ,
3343 plugins : [
34- peerDepsExternal ( ) ,
35- resolve ( ) ,
44+ resolve ( {
45+ alias : {
46+ 'src' : path . resolve ( './src' )
47+ }
48+ } ) ,
3649 commonjs ( ) ,
3750 typescript ( {
3851 tsconfig : "./tsconfig.json" ,
Original file line number Diff line number Diff line change 1111 "jsx" : " react-jsx" ,
1212 "module" : " ESNext" ,
1313 "declaration" : true ,
14-
14+ "importHelpers" : false ,
1515 "sourceMap" : true ,
1616 "outDir" : " dist" ,
1717 "moduleResolution" : " node" ,
You can’t perform that action at this time.
0 commit comments