Skip to content

Commit

Permalink
frontend: Upgrade CRA, webpack5, storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
illume committed May 12, 2022
1 parent 504f279 commit 7e1e9bb
Show file tree
Hide file tree
Showing 8 changed files with 43,245 additions and 31,843 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN cd ./backend && go build -o ./headlamp-server ./cmd/
# Keep npm install separated so source changes don't trigger install
FROM base-build AS frontendinstall
COPY frontend/package*.json /headlamp/frontend/
COPY frontend/patches/* /headlamp/frontend/patches/
WORKDIR /headlamp
RUN cd ./frontend && npm install --only=prod

Expand Down
62 changes: 32 additions & 30 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 20 additions & 5 deletions frontend/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/preset-create-react-app',
],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
builder: 'webpack5',
},
webpackFinal: config => {
return {
...config,
resolve: {
...config.resolve,
fallback: {
...config.fallback,
crypto: require.resolve('crypto-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
},
},
};
},
};
Loading

0 comments on commit 7e1e9bb

Please sign in to comment.