Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace cra with webpack #41

Merged
merged 3 commits into from
Dec 10, 2020
Merged

Conversation

emilioSp
Copy link
Contributor

resolves #31, resolves #32

This PR contains:

  • Remove useless files from cra (favicon, logo, etc…)
  • Leaner index.html template in src
  • Remove serviceWorker (we will use it when and if we need it)
  • Add babel
  • Add webpack@5
  • Add jest
  • Webpack 5 has introduced a breaking change: no more node.js polyfill (https://webpack.js.org/blog/2020-10-10-webpack-5-release/#automatic-nodejs-polyfills-removed). This is a problem because our dependency @apidevtools/json-schema-ref-parser is written for node.js. In order to make @apidevtools/json-schema-ref-parser work in the browser env we need to add several fallbacks in the webpack config.
  • Change allowJs to true in ts-config because it is required by jest to parse test-utils.js
  • Add identity-obj-proxy dev dep because it is required by jest config
  • We have a problem with the bundle size (We could treat it with a different issue in the future)

src/index.html Show resolved Hide resolved
tsconfig.json Show resolved Hide resolved
@sebbalex
Copy link
Member

@emilioSp can you fix conflict here? thanks

@sebbalex sebbalex merged commit 4714aa0 into italia:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile typescript to es2020 Replace CRA with webpack + babel + typescript minimal starter kit
2 participants