node-packer icon indicating copy to clipboard operation
node-packer copied to clipboard

is asset files supported?

Open zozobreakzou opened this issue 6 years ago • 4 comments

if the node app use a resource file(such as a png or a csv file) with fs, does the nodec bundle them and the output exe can work on an new machine without these resource files?

zozobreakzou avatar Aug 09 '17 04:08 zozobreakzou

Yes

pmq20 avatar Aug 09 '17 07:08 pmq20

but failed in my test. even the read_file1 function. node_app.zip

zozobreakzou avatar Aug 09 '17 08:08 zozobreakzou

in my opinion, it seems nodec bundle all the files in the 'cwd' in to '/enclose_io_memfs', is that right? if so, how to access the files in the bundle?

zozobreakzou avatar Aug 09 '17 08:08 zozobreakzou

That is correct. You could access it like this: fs.readdirSync('/__enclose_io_memfs__').

pmq20 avatar Aug 21 '17 07:08 pmq20