0๐
โ
I solved it by adding โ.vueโ to CreateBucketModal so its โ../components/modal/CreateBucketModal.vueโ.
Is there a way around this?
Being able to resolve single-file Vue components without the .vue
extension is down to how Webpack is configured, specifically the resolve.extensions
configuration.
The default for a Vue CLI v3 project is
resolve {
extensions: [
'.wasm',
'.mjs',
'.js',
'.jsx',
'.vue', // ๐ note this entry
'.json'
]
}
I can only assume then that you have modified your Webpack config. If you are manipulating resolve.extensions
, try adding to it instead of overwriting it, eg
// vue.config.js
module.exports = {
configureWebpack: config => {
config.resolve.extensions.push('.some.new.extension')
// instead of config.resolve.extensions = ['.some.new.extension']
}
}
Source:stackexchange.com