Skip to content

Commit cad85a2

Browse files
committed
upgrade code to webpack v5
Ref: https://webpack.js.org/migrate/5/
1 parent 7eaa0bb commit cad85a2

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/build.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,11 @@ async function webpackConfig(
158158
entry: {},
159159
target: 'node',
160160
plugins: [
161-
new webpack.IgnorePlugin(/vertx/),
161+
new webpack.IgnorePlugin({ resourceRegExp: /vertx/ }),
162162
new webpack.DefinePlugin(defineEnv),
163163
],
164164
output: {
165165
path: functionsPath,
166-
filename: '[name].js',
167166
libraryTarget: 'commonjs',
168167
},
169168
optimization: {

lib/build.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ describe('build', () => {
106106
});
107107

108108
describe('webpack custom config merge', () => {
109-
beforeEach(() => jest.resetModules());
110-
111109
it('should merge plugins', async () => {
112110
const script = `module.exports = () => console.log("hello world")`;
113111
await writeFileInFunctions(script, 'index.js');

0 commit comments

Comments
 (0)