Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .babelrc → babel.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"presets": [
module.exports = function (api) {
api.cache(true);

const presets = [
[
"@babel/preset-env",
{
"loose": true
}
],
"@babel/preset-react"
],
"plugins": [
];
const plugins = [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-object-assign"
]
];

return {
presets,
plugins
};
}
19 changes: 13 additions & 6 deletions example/.babelrc → example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"presets": [
module.exports = function (api) {
api.cache(true);

const presets = [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
];
const plugins = [
"dynamic-import-node",
"@babel/plugin-proposal-class-properties",
"../babel",
Expand All @@ -16,5 +18,10 @@
}
}
]
]
}
];

return {
presets,
plugins
};
}
2 changes: 1 addition & 1 deletion example/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import Loadable from 'react-loadable';
import Loading from './Loading';
import delay from '../utils/delay';
import path from 'path';
import path from 'path-browserify';

const LoadableExample = Loadable({
loader: () => import('./Example'),
Expand Down
2 changes: 1 addition & 1 deletion example/components/Example.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import Loadable from 'react-loadable';
import Loading from './Loading';
import delay from '../utils/delay';
import path from 'path';
import path from 'path-browserify';

const LoadableNested = Loadable({
loader: () => import('./ExampleNested'),
Expand Down
Loading