Pkg: Using external not compiled js scripts?

Created on 21 Aug 2018  路  3Comments  路  Source: vercel/pkg

Is it possible to use not compiled js scripts when main compiled binary is running?
As example i want one script to remain changable and dynamically reloaded during work of the main process.

Most helpful comment

Please use dynamic require external scripts. For example:

require(process.cwd() + './path/to/script.js')

All 3 comments

I'm getting this error:
Error: File or directory '/**/Capitalist/conf/settings.tpl.js' was not included into executable at compilation stage. Please recompile adding it as asset or script.
Is it possible to leave this file as is and compile it on runtime?

Please use dynamic require external scripts. For example:

require(process.cwd() + './path/to/script.js')

Thank you very much! It helped!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

telunc picture telunc  路  4Comments

Ks89 picture Ks89  路  4Comments

ydubois-fr picture ydubois-fr  路  4Comments

j-brown picture j-brown  路  4Comments

adrukh picture adrukh  路  4Comments