ソースを参照

Plugins: expose react-redux, redux (#18501)

Ryan McKinley 6 年 前
コミット
63f47fd8e2

+ 2 - 0
packages/grafana-toolkit/src/config/webpack.plugin.config.ts

@@ -151,6 +151,8 @@ export const getWebpackConfig: WebpackConfigurationGetter = options => {
       'slate-react',
       'react',
       'react-dom',
+      'react-redux',
+      'redux',
       'rxjs',
       'd3',
       'angular',

+ 4 - 0
public/app/features/plugins/plugin_loader.ts

@@ -15,6 +15,8 @@ import slateReact from 'slate-react';
 import slatePlain from 'slate-plain-serializer';
 import react from 'react';
 import reactDom from 'react-dom';
+import reactRedux from 'react-redux';
+import redux from 'redux';
 
 import config from 'app/core/config';
 import TimeSeries from 'app/core/time_series2';
@@ -93,6 +95,8 @@ exposeToPlugin('slate-react', slateReact);
 exposeToPlugin('slate-plain-serializer', slatePlain);
 exposeToPlugin('react', react);
 exposeToPlugin('react-dom', reactDom);
+exposeToPlugin('react-redux', reactRedux);
+exposeToPlugin('redux', redux);
 exposeToPlugin('emotion', emotion);
 
 exposeToPlugin('app/features/dashboard/impression_store', {