10000 fix: Fix bugs when using VueComponentPlugin in development. · fuse-box/fuse-box@b32016d · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit b32016d

Browse files
orblazernchanged
authored andcommitted
fix: Fix bugs when using VueComponentPlugin in development.
1 parent 699979e commit b32016d

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/BundleSource.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ export class BundleSource {
6262
*/
6363
public init() {
6464
this.concat.add(null, "(function(FuseBox){FuseBox.$fuse$=FuseBox;");
65+
66+
// handle server bundle
67+
if (this.context.target) {
68+
this.concat.add(null, `FuseBox.target = "${this.context.target}"`);
69+
}
70+
71+
if (this.context.serverBundle) {
72+
this.concat.add(null, `FuseBox.isServer = true;`);
73+
}
74+
75+
if (this.context.fuse.producer && this.context.fuse.producer.allowSyntheticDefaultImports) {
76+
this.concat.add(null, `// allowSyntheticDefaultImports`);
77+
this.concat.add(null, `FuseBox.sdep = true`);
78+
}
6579
}
6680

6781
public annotate(comment: string) {
@@ -190,19 +204,6 @@ ${file.headerContent ? file.headerContent.join("\n") : ""}`);
190204

191205
let mainEntry;
192206

193-
// handle server bundle
194-
if (this.context.target) {
195-
this.concat.add(null, `FuseBox.target = "${this.context.target}"`);
196-
}
197-
198-
if (context.serverBundle) {
199-
this.concat.add(null, `FuseBox.isServer = true;`);
200-
}
201-
202-
if ( context.fuse.producer && context.fuse.producer.allowSyntheticDefaultImports ){
203-
this.concat.add(null, `// allowSyntheticDefaultImports`);
204-
this.concat.add(null, `FuseBox.sdep = true`);
205-
}
206207
// writing other bundles info
207208
if (this.bundleInfoObject) {
208209
this.concat.add(null, `FuseBox.global("__fsbx__bundles__",${JSON.stringify(this.bundleInfoObject)})`);

0 commit comments

Comments
 (0)
0