Skip to content

Commit 1aef5ac

Browse files
authored
Merge pull request #129 from data-driven-forms/fix-srr-build
fix(ssr): added global object to renderer and pf4 webpack config.
2 parents b60ad84 + d5008df commit 1aef5ac

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

packages/react-form-renderer/config/webpack.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const prodConfig = {
5757
path: resolve('./dist'),
5858
library: '[name]',
5959
libraryTarget: 'umd',
60+
globalObject: 'this',
61+
umdNamedDefine: true,
6062
filename: 'index.js',
6163
},
6264
};

packages/react-form-renderer/src/form-renderer/form-controls.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { FormSpy } from 'react-final-form';
33
import PropTypes from 'prop-types';
4-
import { __ } from '../global-functions';
54
import RendererContext from './renderer-context';
65

76
const completeButtons = buttonOrder => {
@@ -92,9 +91,9 @@ FormControls.propTypes = {
9291
};
9392

9493
FormControls.defaultProps = {
95-
submitLabel: __('Submit'),
96-
cancelLabel: __('Cancel'),
97-
resetLabel: __('Reset'),
94+
submitLabel: 'Submit',
95+
cancelLabel: 'Cancel',
96+
resetLabel: 'Reset',
9897
canReset: false,
9998
canSubmit: false,
10099
buttonOrder: [ 'submit', 'reset', 'cancel' ],

packages/react-form-renderer/src/global-functions/index.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)