Skip to content

Commit

Permalink
chore: re-added dev web bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Dec 25, 2022
1 parent 04d95f4 commit 9780d13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tsc -p build/tsconfig.types.json &
webpack --config build/webpack.config.js &

# Add a simple index.d.ts file to type all dev builds
echo "export * from '../dist/index';" | tee dev/index.d.ts > /dev/null &
echo "export * from '../dist/index';" | tee dev/index.d.ts dev/index.bundle.d.ts > /dev/null &
echo "export * from './index';" | tee dist/index.bundle.d.ts > /dev/null &

wait
Expand Down
6 changes: 6 additions & 0 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,11 @@ module.exports = [
output: 'dist/index.bundle.js',
libraryType: 'umd',
libraryName: 'AxiosCacheInterceptor'
}),
config({
output: 'dev/index.bundle.js',
libraryType: 'umd',
libraryName: 'AxiosCacheInterceptor',
devBuild: true
})
];
10 changes: 6 additions & 4 deletions examples/react/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ export const App = () => {
error: null
});

axios.get('https://jsonplaceholder.typicode.com/users').then(
({ data }) => setResponse({ data, loading: false, error: null }),
(error) => setResponse({ data: [], loading: false, error })
);
useEffect(() => {
axios.get('https://jsonplaceholder.typicode.com/users').then(
({ data }) => setResponse({ data, loading: false, error: null }),
(error) => setResponse({ data: [], loading: false, error })
);
}, []);

if (loading) {
return <div>Loading...</div>;
Expand Down

0 comments on commit 9780d13

Please sign in to comment.