Fix Webpack app build

This commit is contained in:
Nathan Bierema 2022-01-09 17:17:03 -05:00
parent e4c221b22a
commit e6edc33b22
3 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import { render } from 'react-dom'; import { render } from 'react-dom';
import App from '../src'; import { Root } from '../src';
render(<App />, document.getElementById('root')); render(<Root />, document.getElementById('root'));
if (module.hot) { if (module.hot) {
// https://github.com/webpack/webpack/issues/418#issuecomment-53398056 // https://github.com/webpack/webpack/issues/418#issuecomment-53398056

View File

@ -9,7 +9,7 @@ import App from './containers/App';
import { StoreState } from './reducers'; import { StoreState } from './reducers';
import { StoreAction } from './actions'; import { StoreAction } from './actions';
export class ReduxDevToolsApp extends Component { export class Root extends Component {
store?: Store<StoreState, StoreAction>; store?: Store<StoreState, StoreAction>;
persistor?: Persistor; persistor?: Persistor;

View File

@ -9,7 +9,7 @@ export default (env: { production?: boolean } = {}): webpack.Configuration => ({
}, },
output: { output: {
library: 'ReduxDevToolsApp', library: 'ReduxDevToolsApp',
libraryExport: 'ReduxDevToolsApp', libraryExport: 'Root',
libraryTarget: 'umd', libraryTarget: 'umd',
path: path.resolve(__dirname, 'umd'), path: path.resolve(__dirname, 'umd'),
filename: env.production filename: env.production