aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/DocumentDecorations.tsx2
-rw-r--r--webpack.config.js13
2 files changed, 9 insertions, 6 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index fc7c16296..6639f1cce 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -483,7 +483,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
<div className="documentDecorations-title" key="title" onPointerDown={this.onTitleDown} >
<span style={{ width: "calc(100% - 25px)", display: "inline-block" }}>{`${this.selectionTitle}`}</span>
</div>
- </>
+ </>;
bounds.x = Math.max(0, bounds.x - this._resizeBorderWidth / 2) + this._resizeBorderWidth / 2;
bounds.y = Math.max(0, bounds.y - this._resizeBorderWidth / 2 - this._titleHeight) + this._resizeBorderWidth / 2 + this._titleHeight;
diff --git a/webpack.config.js b/webpack.config.js
index 67d492e1f..1351008ea 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -16,7 +16,7 @@ const plugins = [
new webpack.HotModuleReplacementPlugin(),
];
-(function transferEnvironmentVariables() {
+function transferEnvironmentVariables() {
const prefix = "_CLIENT_";
const {
parsed
@@ -24,13 +24,16 @@ const plugins = [
if (!parsed) {
return;
}
- plugins.push(new webpack.DefinePlugin(Object.keys(parsed).reduce((mapping, envKey) => {
+ const resolvedClientSide = Object.keys(parsed).reduce((mapping, envKey) => {
if (envKey.startsWith(prefix)) {
- mapping[`process.env.${envKey.replace(prefix, "")}`] = JSON.stringify(parsed[envKey]);
+ mapping[`process.env.${envKey.replace(prefix, "")}`] = parsed[envKey];
}
return mapping;
- }, {})));
-})();
+ }, {});
+ plugins.push(new webpack.DefinePlugin(resolvedClientSide));
+}
+
+transferEnvironmentVariables();
module.exports = {
mode: 'development',