From a2be98a0b804e82f23684f8fd3d8c24ad5ae3e40 Mon Sep 17 00:00:00 2001 From: Michael Trotter Date: Thu, 14 Jun 2018 03:31:34 -0600 Subject: Update regex for 0.12.0 (#112) --- src/to-javascript.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/to-javascript.js b/src/to-javascript.js index 28dde7a..a7d64a2 100644 --- a/src/to-javascript.js +++ b/src/to-javascript.js @@ -69,9 +69,9 @@ function makeBundleJS(psModule) { // any new imports in order to allow webpack to watch the new files // before they have been successfully compiled. function makeJS(psModule, psModuleMap, js) { - const requireRE = /require\(['"]\.\.\/([\w\.]+)['"]\)/g; + const requireRE = /require\(['"]\.\.\/([\w\.]+)(?:\/index\.js)?['"]\)/g; - const foreignRE = /require\(['"]\.\/foreign['"]\)/g; + const foreignRE = /require\(['"]\.\/foreign(?:\.js)?['"]\)/g; const name = psModule.name; -- cgit v1.2.3