Skip to content

Commit

Permalink
fix: react entry file
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed Jun 13, 2020
1 parent a866e38 commit e304966
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/bytemd/react/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"module": "dist/index.mjs",
"main": "dist/index.js",
"types": "dist/index.d.ts"
"module": "dist/index.mjs",
"types": "src/index.d.ts"
}
9 changes: 4 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ const production = !process.env.ROLLUP_WATCH;
/** @type {Record<string, import('rollup').RollupOptions>} */
const packageConfigs = {
bytemd: {},
// 'bytemd/react': {
// input: path.resolve('packages/bytemd/react/src/index.tsx'),
// external: ['bytemd', 'react'],
// },
'bytemd/react': {
external: ['react'],
},
'plugin-highlight': {},
'plugin-math': {},
'plugin-mermaid': {},
Expand Down Expand Up @@ -66,7 +65,7 @@ Object.entries(packageConfigs).forEach(([key, config]) => {
// Make svelte related packages external to avoid multiple copies
// https://github.com/sveltejs/svelte/issues/3671
if (!config.external) config.external = Object.keys(pkg.dependencies || {});
config.external.push('svelte', 'svelte/internal');
config.external.push('bytemd', 'svelte', 'svelte/internal');

return config;
});
Expand Down

0 comments on commit e304966

Please sign in to comment.