Do you use any relative paths inside your CSS/Sass files? Something like: @import '@/otherfile.css'
I have this config in my webpack.mix.js file:
resolve: {
alias: {
'@': path.resolve('resources/assets'),
vue$: 'vue/dist/vue.runtime.esm.js',
},
},
And keep the ./js and ./sass directories inside ./resources/assets like the old days.
The downside is always having to add /js/ on my JavaScript imports, for example:
import SelectInput from '@/js/components/forms/inputs/SelectInput';
import FormField from '@/js/components/forms/FormField';
But this setup works for me.
Also when importing a CSS file inside a Vue SFC (Single-File Component) I have to prepend a ~ to the path (don't know why), as such:
<style lang="scss" scoped>
@import "~@/sass/_app-root.scss";
// ...
Here _app-root.scss is just a Sass partial with minimal stuff to be used inside Vue SFC.
Hope something here helps you.