Skip to content

Commit 9be34fa

Browse files
Khoubza YounesKHOUBZA Younes
Khoubza Younes
authored and
KHOUBZA Younes
committed
feat: extract css into there own files
1 parent 76c6e33 commit 9be34fa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/sweetalert/src/sweetalert.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
QueueableInterface,
77
} from '@flasher/flasher';
88

9-
import Swal, { SweetAlertOptions } from 'sweetalert2';
9+
import Swal from 'sweetalert2/dist/sweetalert2.js';
10+
import { SweetAlertOptions } from 'sweetalert2';
1011
import 'sweetalert2/dist/sweetalert2.min.css';
1112

1213
type SwalType = typeof Swal;

rollup.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default {
3838
targets: ['dist'],
3939
}),
4040
styles({
41+
mode: 'extract',
4142
plugins: {
4243
cssnano,
4344
"postcss-discard-comments": {
@@ -58,12 +59,14 @@ export default {
5859
format: 'cjs',
5960
exports: 'auto',
6061
sourcemap: !isProduction,
62+
assetFileNames: '[name][extname]',
6163
},
6264
{
6365
file: module.output,
6466
format: 'umd',
6567
exports: 'auto',
6668
sourcemap: !isProduction,
69+
assetFileNames: '[name][extname]',
6770
name: module.name,
6871
globals: module.globals || {},
6972
},
@@ -72,6 +75,7 @@ export default {
7275
format: 'umd',
7376
exports: 'auto',
7477
sourcemap: !isProduction,
78+
assetFileNames: '[name][extname]',
7579
name: module.name,
7680
globals: module.globals || {},
7781
plugins: [

0 commit comments

Comments
 (0)