Given two input files, values.js and index.js, is it possible to resolve code references in order to obtain the code described in output.js?
Note that the desired output is not the evaluated code, but simply a string with resolved references.
// values.js
export const values = {
aFunction: () => { },
aDate: new Date(1644318966754),
}
// index.js
import { values } from './values'
const otherValues = {
aSymbol: Symbol('foo'),
aString: new String("A String object"),
}
const allValues = {
...values,
...otherValues,
}
// output.js
const allValues = {
aFunction: () => { },
aDate: new Date(1644318966754),
aSymbol: Symbol('foo'),
aString: new String("A String object"),
}