Skip to content

Commit 2c59bf8

Browse files
committed
fix files order
1 parent 4d631a0 commit 2c59bf8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/webpack.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ module.exports = function(context, moduleName, options, callback) {
8989

9090
options.context = options.context || context;
9191

92-
options.emitFile = options.emitFile || function(filename, content) {
93-
options.internal.fileWrites.push([path.join(options.outputDirectory, filename), content]);
92+
options.emitFile = options.emitFile || function(filename, content, toFront) {
93+
options.internal.fileWrites[toFront?"unshift":"push"]([path.join(options.outputDirectory, filename), content]);
9494
}
9595

9696
if(options.output) {
@@ -343,7 +343,7 @@ function webpack(context, moduleName, options, callback) {
343343
}
344344

345345
// push it as "file write"
346-
options.emitFile(filename, buffer);
346+
options.emitFile(filename, buffer, true);
347347
});
348348
options.events.emit("task-end", "prepare chunks");
349349
options.events.emit("start-writing", hash);

0 commit comments

Comments
 (0)