Skip to content

Commit

Permalink
fix: compiler mode render fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Jul 5, 2021
1 parent 09c207d commit 807a0ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transform/transformWebpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ export class WebpackTransformer implements Transformer {
Object.keys(alias).forEach((key) => {
let relativePath = path.relative(rootDir, path.resolve(rootDir, alias[key]))
relativePath = relativePath.replace(/\\/g, '/')
if (key === 'vue$') {
key = key.replace('$', '')
relativePath = 'node_modules/' + relativePath
}
defaultAlias.push({
find: key,
replacement: new RawValue(`path.resolve(__dirname,'${relativePath}')`)
Expand Down

0 comments on commit 807a0ca

Please sign in to comment.