Skip to content

Commit

Permalink
refactor(bundle): only create one bundle #15
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 8, 2019
1 parent b9f4d60 commit 936550b
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 219 deletions.
4 changes: 2 additions & 2 deletions dist/ReactFlow.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ReactFlow.min.js.map

Large diffs are not rendered by default.

189 changes: 0 additions & 189 deletions dist/plugins/index.css

This file was deleted.

8 changes: 0 additions & 8 deletions dist/plugins/index.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/plugins/index.js.map

This file was deleted.

3 changes: 1 addition & 2 deletions examples/advanced/scripts/ExampleGraph.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { PureComponent } from 'react';

import Graph, { isEdge, removeElements, addEdge, getOutgoers } from '../../../src';
import { MiniMap, Controls } from '../../../src/plugins';
import Graph, { isEdge, removeElements, addEdge, getOutgoers, MiniMap, Controls } from '../../../src';

import SpecialNode from './SpecialNode';
import InputNode from './InputNode';
Expand Down
34 changes: 18 additions & 16 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,22 @@ export default [{
}
},
plugins
}, {
input: 'src/plugins/index.js',
external: external,
onwarn,
output: {
name: 'ReactFlow Plugins',
file: 'dist/plugins/index.js',
format: 'umd',
sourcemap: isProd,
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'prop-types': 'PropTypes'
}
},
plugins
}];

// }, {
// input: 'src/plugins/index.js',
// external: external,
// onwarn,
// output: {
// name: 'ReactFlow Plugins',
// file: 'dist/plugins/index.js',
// format: 'umd',
// sourcemap: isProd,
// globals: {
// react: 'React',
// 'react-dom': 'ReactDOM',
// 'prop-types': 'PropTypes'
// }
// },
// plugins
// }];
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactFlow from './container/ReactFlow';
export default ReactFlow;

export { default as Handle } from './components/Handle';
export { MiniMap, Controls } from './plugins';

export {
isNode,
Expand Down

0 comments on commit 936550b

Please sign in to comment.