Skip to content

Commit

Permalink
fix: support webpack v5 (#1057)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency webpack to v5

* chore: add a target field to generate ES5 compatible code for bundling

* test: set a target web

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Toru Kobayashi <koba0004@gmail.com>
  • Loading branch information
3 people committed Oct 21, 2020
1 parent 6d3d422 commit 3d8d14e
Show file tree
Hide file tree
Showing 3 changed files with 206 additions and 34 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ts-jest": "^26.4.1",
"ts-loader": "^8.0.5",
"typescript": "^4.0.3",
"webpack": "^4.44.2"
"webpack": "^5.0.0"
},
"peerDependencies": {
"react": "^16.13.0",
Expand Down
1 change: 1 addition & 0 deletions scripts/build-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const MemoryFS = require('memory-fs')
const compiler = webpack({
mode: 'development',
entry: path.resolve('src', 'index.ts'),
target: ['web', 'es5'],
devtool: 'nosources-source-map',
plugins: [new ECMAVersionValidatorPlugin()],
resolve: {
Expand Down

0 comments on commit 3d8d14e

Please sign in to comment.