esri-wab-build icon indicating copy to clipboard operation
esri-wab-build copied to clipboard

writeProfile in prebuild.js strips regex

Open lancegosby opened this issue 6 years ago • 9 comments

when writing the app.profile.js file, the prebuild.js script uses JSON.stringify(). Unfortunately this strips out any regex from the profile and replaces it with an empty object.

In my _app.profile.js file, I am trying to fix the build errors thrown by moment by excluding some files from the package using the trees property. For example:

packages: [
    { 
        //other packages
    },
    {
      name: "moment",
      location: "./moment",
      trees: [
        [".", ".", /(\/\.)|(~$)|(test|txt|src|min|templates)/]
      ]
    },
    {
        // more packages
    }
]

lancegosby avatar Aug 24 '17 18:08 lancegosby