Skip to content

Commit adf5445

Browse files
committed
fixed the windows bug with requireFromString
1 parent fd7e9bc commit adf5445

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils/require.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Options {
1515
defaults: Models.Defaults;
1616
constructor(optsObj: Object) {
1717
this.vueFileRegex = /([\w/.\-@_\d]*\.vue)/igm;
18-
this.requireRegex = /(require\(['"])([\w/.\-@_\d]*\.vue)(['"]\))/igm;
18+
this.requireRegex = /(require\(['"])([\w:/.\-@_\d]*\.vue)(['"]\))/igm;
1919
this.appendPaths = optsObj.appendPaths || [];
2020
this.prependPaths = optsObj.prependPaths || [];
2121
this.rootPath = optsObj.rootPath || '';
@@ -131,7 +131,6 @@ function requireFromString(code: string, filename: string = '', optsObj: Object
131131
reject(error);
132132
});
133133
} else {
134-
console.log(code)
135134
m._compile(code, filename);
136135
resolve(m.exports.default);
137136
}

0 commit comments

Comments
 (0)