Skip to content

Commit ea0e30a

Browse files
committed
fix(pf3): do not use named export for DayPicker
1 parent 5430f06 commit ea0e30a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/pf3-component-mapper/rollup.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ const babelOptions = {
2323

2424
const commonjsOptions = {
2525
ignoreGlobal: true,
26-
include: /node_modules/,
26+
include: [
27+
/node_modules/,
28+
'../../node_modules/**',
29+
30+
],
2731
namedExports: {
2832
'../react-form-renderer/dist/index.js': [ 'composeValidators' ],
33+
'../../node_modules/react-day-picker/DayPicker.js': [ 'DayPicker' ],
2934
},
3035
};
3136

@@ -42,8 +47,8 @@ export default [{
4247
plugins: [
4348
async(),
4449
nodeResolve(),
45-
babel(babelOptions),
4650
commonjs(commonjsOptions),
51+
babel(babelOptions),
4752
nodeGlobals(), // Wait for https://github.com/cssinjs/jss/pull/893
4853
replace({ 'process.env.NODE_ENV': JSON.stringify('production') }),
4954
sizeSnapshot({ snapshotPath: 'size-snapshot.json' }),

packages/pf3-component-mapper/src/form-fields/date-time-picker/popover-root.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Navbar from './navbar';
44
import MonthSelector from './month-selector';
55
import YearSelector from './year-selector';
66
import TimePicker from './time-picker';
7-
import DayPicker from 'react-day-picker/DayPicker';
7+
import * as DayPicker from 'react-day-picker/DayPicker';
88
import MomentLocaleUtils from 'react-day-picker/moment';
99
import './date-picker-styles.scss';
1010

@@ -54,7 +54,7 @@ const PopoverRoot = ({
5454
onPreviousClick={ () => yearChange(selectedDay ? selectedDay.getFullYear() - 1 : new Date().getFullYear() - 1) }
5555
/>)
5656
:
57-
<DayPicker
57+
<DayPicker.DayPicker
5858
onDayClick={ onDayClick }
5959
selectedDays={ selectedDay }
6060
month={ selectedDay }

0 commit comments

Comments
 (0)