Skip to content

Commit 206e107

Browse files
committed
Merge branch 'master' of github.com:codercom/code-server
2 parents 12c8b5d + 4aa20fd commit 206e107

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/webpack.general.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ module.exports = (options = {}) => ({
2424
test: /\.(j|t)s/,
2525
options: {
2626
multiple: [{
27-
// These will be handled by file-loader. We need the location because
28-
// they are parsed as URIs and will throw errors if not fully formed.
29-
// The !! prefix causes it to ignore other loaders (doesn't work).
27+
// These will be handled by file-loader. Must be a fully formed URI.
28+
// The !! prefix causes it to ignore other loaders.
3029
search: "require\\.toUrl\\(",
31-
replace: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'') + '/' + require('!!file-loader?name=[path][name].[ext]!' + ",
30+
replace: `${
31+
options.node
32+
? "'file://'"
33+
: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'')"
34+
} + '/' + require('!!file-loader?name=[path][name].[ext]!' + `,
3235
flags: "g",
3336
}, {
3437
search: "require\\.__\\$__nodeRequire",

scripts/webpack.node.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
const merge = require("webpack-merge");
22

33
module.exports = (options = {}) => merge(
4-
require("./webpack.general.config")(options), {
4+
require("./webpack.general.config")({
5+
...options,
6+
node: true,
7+
}), {
58
devtool: "none",
69
mode: "production",
710
target: "node",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy