File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 19
19
*/
20
20
/* global Promise */
21
21
define ( [ "require" ] , function ( require ) {
22
+ var writeFile ;
23
+ var lieId = "lie/dist/lie" ;
24
+
22
25
return {
23
26
load : function ( name , req , onload , config ) {
24
27
config = config || { } ;
@@ -30,11 +33,19 @@ define(["require"], function (require) {
30
33
// Use absolute path to allow map configuration.
31
34
// Also use a variable to avoid RequireJS detection at build time so it is not included in the
32
35
// layer.
33
- var lieId = "lie/dist/lie" ;
34
36
require ( [ lieId ] , function ( lie ) {
35
37
onload ( lie ) ;
36
38
} ) ;
37
39
}
40
+ } ,
41
+ writeFile : function ( pluginName , resource , require , write ) {
42
+ writeFile = write ;
43
+ } ,
44
+ onLayerEnd : function ( ) {
45
+ var fs = require ( "fs" ) ;
46
+ var url = require . toUrl ( lieId + ".js" ) ;
47
+ // copy lie to the build output.
48
+ writeFile ( url , fs . readFileSync ( url ) ) ;
38
49
}
39
50
} ;
40
51
} ) ;
You can’t perform that action at this time.
0 commit comments