Skip to content

Commit

Permalink
feat: update to webpack5
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed Feb 2, 2024
1 parent f2c228d commit ed0b219
Show file tree
Hide file tree
Showing 5 changed files with 657 additions and 1,012 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
!__tests__/packages/**/node_modules
.DS_Store
.idea/
dist/
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: yarn install && yarn run build
command: yarn run start


4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
"pkg": "^4.5.1",
"prettier": "^1.19.1",
"prettier-eslint-cli": "^4.1.1",
"webpack": "^4.29.6",
"webpack-cli": "^3.1.2",
"webpack": "^5.90.1",
"webpack-cli": "^5.1.4",
"which": "^1.2.14",
"yamlify-object": "^0.5.1"
},
Expand Down
6 changes: 2 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ module.exports = {
externals: [/envinfo$/],
plugins: [
new webpack.BannerPlugin({
banner: `#!/usr/bin/env node
"use strict"`,
banner: `#!/usr/bin/env node\n`,
raw: true,
include: 'cli',
}),
new webpack.DefinePlugin({
'global.__VERSION__': JSON.stringify(packageJson.version),
}),
new webpack.IgnorePlugin(/spawn-sync/),
],
};
};
Loading

0 comments on commit ed0b219

Please sign in to comment.