Closed MiDniGG closed 2 years ago
I'm using sweetalert in a Symfony Bundle and use the scss from the bundle in the customer app.
With https://github.com/sweetalert2/sweetalert2-themes/pull/80 my scss file isn't working anymore.
I import the main scss like that
@import "../../vendor/my-bundle/assets/css/main";
The problem ist now, when I run yarn build in the customer app, that it says
yarn build
SassError: Can't find stylesheet to import. ╷ 3 │ @import 'node_modules/sweetalert2/src/variables'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ ../rks-pis-bundle/node_modules/@sweetalert2/theme-bootstrap-4/bootstrap-4.scss 3:9 @import vendor/rks/pis-bundle/assets/css/plugins/_sweetalert2.scss 18:9 @import
because in the customer app, there is no sweetalert2 in node_modules, only in the Bundle.
No SassError. 😅
The recommondation from Webpack says to replace ~ with nothing, this would work fine for me. So please consider to change
@import 'node_modules/sweetalert2/src/variables';
to
@import 'sweetalert2/src/variables';
Thank you @MiDniGG for reporting and sorry about the troubles!
:tada: This issue has been resolved in version 5.0.7 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Current behavior
I'm using sweetalert in a Symfony Bundle and use the scss from the bundle in the customer app.
With https://github.com/sweetalert2/sweetalert2-themes/pull/80 my scss file isn't working anymore.
I import the main scss like that
The problem ist now, when I run
yarn build
in the customer app, that it saysbecause in the customer app, there is no sweetalert2 in node_modules, only in the Bundle.
Expected behavior
No SassError. 😅
Live demo
The recommondation from Webpack says to replace ~ with nothing, this would work fine for me. So please consider to change
@import 'node_modules/sweetalert2/src/variables';
to