Skip to content

Instantly share code, notes, and snippets.

@whs
Last active December 2, 2019 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whs/f80492400b6a20ad13c21a1d8a9ed5b0 to your computer and use it in GitHub Desktop.
Save whs/f80492400b6a20ad13c21a1d8a9ed5b0 to your computer and use it in GitHub Desktop.
const importSpecifier = path.scope.generateUidIdentifier('th')
const importDeclaration = this.t.importDeclaration(
[this.t.importDefaultSpecifier(importSpecifier)],
this.t.stringLiteral('lang/th/file.yaml?' + this.resourceQuery),
)
program.unshiftContainer('body', importDeclaration)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment