pirmax
pirmax

Reputation: 2153

Laravel Mix / Conflict / Multiple assets emit to the same filename

I tried to install CoreUI in my Laravel project using webpack.mix.js. I used the following for style and icons.

// CoreUI Icons Set
@import '~@coreui/icons/css/coreui-icons.min.css';

/* Import Font Awesome Icons Set */
@import '~font-awesome/scss/font-awesome.scss';

/* Import Simple Line Icons Set */
@import '~simple-line-icons/scss/simple-line-icons.scss';

/* Import Flag Icons Set */
@import '~flag-icon-css/css/flag-icon.min.css';

/* Import Bootstrap Vue Styles */
@import '~bootstrap-vue/dist/bootstrap-vue.css';

// If you want to override variables do it here
@import "variables";

// Import styles with default layout.
// If you are going to use dark layout please comment next line
@import "~@coreui/coreui-pro/scss/coreui";

// Import styles with dark layout
// If you want to use dark layout uncomment next line
//@import "~@coreui/coreui-pro/scss/themes/dark/coreui-dark";

// If you want to add something do it here
@import "custom";

// ie fixes
@import "ie-fix";

When I compile code using Laravel Mix I get the following error.

Error: Conflict: Multiple assets emit to the same filename fonts/vendor/@coreui/icons/CoreUI-Icons-Linear-Free.eot?089ab3c11c572362d088083c561cfa55

I found some solutions on the internet, but they don't work in my case.

Upvotes: 0

Views: 1018

Answers (1)

AXTG
AXTG

Reputation: 58

This had to do with a Webpack update. Ran into the same issue, just unlucky timing. Try this.

npm install webpack@4.40.2 --save-dev
rmdir node_modules /Q /S
npm install
npm run prod

Upvotes: 1

Related Questions