Created
October 7, 2020 10:04
-
-
Save rinodrummer/a646ce5ec73d232096bc8970f5c69376 to your computer and use it in GitHub Desktop.
Vite configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
// https://github.com/vitejs/vite/issues/785#issuecomment-689064551 | |
const vitePath = require.resolve('vite', require.main); | |
const resolverPath = path.join(path.dirname(vitePath), 'resolver'); | |
const { supportedExts } = require(resolverPath); | |
if (!supportedExts.includes('.vue')) { | |
supportedExts.push('.vue'); | |
} | |
module.exports = { | |
alias: { | |
'/@/': path.resolve(__dirname, './src'), | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment