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

upgrade to webpack v5 stable version #602

Merged
merged 10 commits into from
Oct 31, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"vm2": "^3.6.6",
"vue": "^2.5.17",
"vue-server-renderer": "^2.5.17",
"webpack": "5.0.0-beta.28",
"webpack": "5.2.0",
"when": "^3.7.8"
}
}
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ module.exports = (
mainFields: ["main"],
plugins: resolvePlugins
},
// https://github.com/vercel/ncc/pull/29#pullrequestreview-177152175
node: false,
node: {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is {} different than false?

I'm looking at the docs between v4 and v5 and the false value seems to be the same for both.

https://v4.webpack.js.org/configuration/node/

https://webpack.js.org/configuration/node/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was the root cause to trigger the error but looks like it just accidently passed tests..after rerun the tests they're still failed. reverted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder why CI gets passed now...seems the nodejs lib fallback wasn't the issue before? I'm still stucking at watcher test failure on my local laptop 🤔 ...

externals: async ({ context, request }, callback) => {
if (externalMap.has(request)) return callback(null, `commonjs ${externalMap.get(request)}`);
return callback();
Expand Down
3 changes: 2 additions & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ for (const unitTest of fs.readdirSync(`${__dirname}/unit`)) {
const actual = code
.trim()
// Windows support
.replace(/\r/g, "");
.replace(/\r/g, "")
.replace(/;+/g, ";");
try {
expect(actual).toBe(expected);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion test/watcher.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ it('Should support custom watch API', async () => {
console.time('Watched Build');
});
});
});
});
Loading