Skip to content

Instantly share code, notes, and snippets.

@rinodrummer
Created October 7, 2020 10:04
Show Gist options
  • Save rinodrummer/a646ce5ec73d232096bc8970f5c69376 to your computer and use it in GitHub Desktop.
Save rinodrummer/a646ce5ec73d232096bc8970f5c69376 to your computer and use it in GitHub Desktop.
Vite configuration
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