File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 */
2020/* global Promise */
2121define ( [ "require" ] , function ( require ) {
22+ var writeFile ;
23+ var lieId = "lie/dist/lie" ;
24+
2225 return {
2326 load : function ( name , req , onload , config ) {
2427 config = config || { } ;
@@ -30,11 +33,19 @@ define(["require"], function (require) {
3033 // Use absolute path to allow map configuration.
3134 // Also use a variable to avoid RequireJS detection at build time so it is not included in the
3235 // layer.
33- var lieId = "lie/dist/lie" ;
3436 require ( [ lieId ] , function ( lie ) {
3537 onload ( lie ) ;
3638 } ) ;
3739 }
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 ) ) ;
3849 }
3950 } ;
4051} ) ;
You can’t perform that action at this time.
0 commit comments