Merge branch 'master' of github.com:codercom/code-server

This commit is contained in:
Kyle Carberry 2019-04-19 20:03:54 -04:00
commit 206e107a9a
No known key found for this signature in database
GPG Key ID: A0409BDB6B0B3EDB
2 changed files with 11 additions and 5 deletions

View File

@ -24,11 +24,14 @@ module.exports = (options = {}) => ({
test: /\.(j|t)s/,
options: {
multiple: [{
// These will be handled by file-loader. We need the location because
// they are parsed as URIs and will throw errors if not fully formed.
// The !! prefix causes it to ignore other loaders (doesn't work).
// These will be handled by file-loader. Must be a fully formed URI.
// The !! prefix causes it to ignore other loaders.
search: "require\\.toUrl\\(",
replace: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'') + '/' + require('!!file-loader?name=[path][name].[ext]!' + ",
replace: `${
options.node
? "'file://'"
: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'')"
} + '/' + require('!!file-loader?name=[path][name].[ext]!' + `,
flags: "g",
}, {
search: "require\\.__\\$__nodeRequire",

View File

@ -1,7 +1,10 @@
const merge = require("webpack-merge");
module.exports = (options = {}) => merge(
require("./webpack.general.config")(options), {
require("./webpack.general.config")({
...options,
node: true,
}), {
devtool: "none",
mode: "production",
target: "node",