We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d003ab commit 29f91f9Copy full SHA for 29f91f9
packages/taro-vite-runner/src/harmony/template/render.ts
@@ -117,10 +117,11 @@ export default class RenderParser extends BaseParser {
117
if (meta.isPackage) {
118
importList.push(`import ${name} from '${meta.scriptPath}'`)
119
} else {
120
+ const etx = path.extname(meta.scriptPath)
121
const nativePath = path.posix
122
.relative(this.context.sourceDir, meta.scriptPath)
123
.replace(/[\\/]+/g, '/')
- .replace(/\.ets$/, '')
124
+ .replace(new RegExp(`\\${etx}$`), '')
125
importList.push(`import ${name} from './${nativePath}'`)
126
}
127
})
0 commit comments