Skip to content

Commit 7490d32

Browse files
author
Ives van Hoorne
committed
Fix dependency imports in Vue
1 parent 04afd27 commit 7490d32

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

src/app/pages/Sandbox/Editor/Workspace/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ const Workspace = ({
8181
sandboxActions,
8282
isPatron,
8383
}: Props) =>
84-
console.log(getTemplateDefinition(sandbox.template).color) ||
8584
<ThemeProvider
8685
theme={{
8786
templateColor: getTemplateDefinition(sandbox.template).color,

src/sandbox/eval/transpilers/vue/loader.js

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,6 @@ export default function(code: string, loaderContext: LoaderContext) {
7979
? style.src
8080
: getRequire('style', style, i, style.scoped);
8181

82-
if (style.src) {
83-
try {
84-
loaderContext.addDependency(
85-
style.src,
86-
_module.module.directoryShortid,
87-
);
88-
} catch (e) {
89-
loaderContext.emitError(e);
90-
}
91-
}
92-
9382
const requireString = `require('${requireLocation}')`;
9483

9584
const invokeStyle = c => ` ${c}\n`;
@@ -131,16 +120,6 @@ export default function(code: string, loaderContext: LoaderContext) {
131120
if (script) {
132121
const file = script.src ? script.src : getRequire('script', script);
133122

134-
if (script.src) {
135-
try {
136-
loaderContext.addDependency(
137-
script.src,
138-
_module.module.directoryShortid,
139-
);
140-
} catch (e) {
141-
loaderContext.emitError(e);
142-
}
143-
}
144123
output += `require('${file}')`;
145124
} else {
146125
output += 'null';
@@ -155,16 +134,6 @@ export default function(code: string, loaderContext: LoaderContext) {
155134
? template.src
156135
: getTemplateRequire(templateCompilerOptions, template);
157136

158-
if (template.src) {
159-
try {
160-
loaderContext.addDependency(
161-
template.src,
162-
_module.module.directoryShortid,
163-
);
164-
} catch (e) {
165-
loaderContext.emitError(e);
166-
}
167-
}
168137
output += `require('${file}')`;
169138
} else {
170139
output += 'null';

src/sandbox/react-error-overlay/effects/proxyConsole.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ const permanentRegister = function proxyConsole(
5454
console[type] = function __stack_frame_overlay_proxy_console__() {
5555
try {
5656
const message = arguments[0];
57-
if (typeof message === 'string' && reactFrameStack.length > 0) {
58-
callback(message, reactFrameStack[reactFrameStack.length - 1]);
57+
if (typeof message === 'string') {
58+
if (reactFrameStack.length > 0) {
59+
callback(message, reactFrameStack[reactFrameStack.length - 1]);
60+
}
5961
}
6062
} catch (err) {
6163
// Warnings must never crash. Rethrow with a clean stack.

src/sandbox/react-error-overlay/overlay.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ function inject() {
238238
{
239239
message: data.message,
240240
stack: data.stack,
241-
__unmap_source: '/static/js/bundle.js',
242241
},
243242
false,
244243
);

0 commit comments

Comments
 (0)