diff --git a/CHANGELOG.md b/CHANGELOG.md index e14ee19..cbfbd55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.9.4 + +- Fix `handlebarsConfig` file not found on Windows + ## 1.9.3 - Fix `handlebarsConfig` file not found even when path is correct diff --git a/package.json b/package.json index 6214d6e..cab81ce 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Module Templates", "publisher": "asbjornh", "icon": "icon.png", - "version": "1.9.3", + "version": "1.9.4", "description": "A VSCode extension for creating file/folder templates for new modules", "scripts": { "vscode:prepublish": "webpack", diff --git a/source/utils.ts b/source/utils.ts index ef61cd7..57f53ea 100644 --- a/source/utils.ts +++ b/source/utils.ts @@ -81,8 +81,8 @@ export function getEngine(root: WorkspaceFolder): Engine { const tryRequire = (path: string) => { try { - // NOTE: Webpack does some shenanigans with `require` building (this does not happen when debugging the extension in VSCode) - return eval(`require("${path}")`); + // NOTE: Webpack does some shenanigans with `require` when building (this does not happen when debugging the extension in VSCode) + return eval("require")(path); } catch (error) { throw new Error( `${error.name}: ${error.message} in ${error.stack.split("\n")[0]}`,