External JS/JSON Files and S3/SSM Object References

So I know I can make an external file like this:

# serverless.yml
environment:
  VAR1: ${file(config/envConfig.yml:var1)
# config/envConfig.yml
var1: ${ssm:/appname/devTier/VAR1~true}

I have a large collection of external files in JS, not YAML (config/envConfig.js) I know stringing that will not work:

# serverless.yml
environment:
   VAR1: ${file(config/envConfig.js:config.var1)

I get

# config/envConfig.js
module.exports.config = () => {
  return {
    var1: '${ssm:/appname/devTier/VAR1~true}'
}

or

# config/envConfig.js
module.exports.config = () => {
  return {
    var1: "${ssm:/appname/devTier/VAR1~true}"
}

or

# config/envConfig.js
module.exports.config = () => {
  return {
    var1: "${{ssm:/appname/devTier/VAR1~true}}"
}

All get the string ssm:/appname/devTier/VAR1~true or ${ssm:/appname/devTier/VAR1~true} or ${{ssm:/appname/devTier/VAR1~true}} in the Lambda console for the handler deployment, not the value I want from SSM, let’s say TEST. Everything assumes yaml external files and I cannot figure it out.

I guess it is time to talk to people more actively and try to PR this if it is not included in sls yet. Oh well!