@@ -10,6 +10,7 @@ import babel from '@rollup/plugin-babel';
10
10
import PostCSS from 'rollup-plugin-postcss' ;
11
11
import { terser } from 'rollup-plugin-terser' ;
12
12
import minimist from 'minimist' ;
13
+ import copy from 'rollup-plugin-copy' ;
13
14
14
15
// Get browserslist config and remove ie from es build targets
15
16
const esbrowserslist = fs
@@ -100,6 +101,7 @@ if (!argv.format || argv.format === 'es') {
100
101
external,
101
102
output : {
102
103
file : 'dist/litepie-datepicker.esm.js' ,
104
+ inlineDynamicImports : true ,
103
105
format : 'esm' ,
104
106
exports : 'named'
105
107
} ,
@@ -119,7 +121,10 @@ if (!argv.format || argv.format === 'es') {
119
121
]
120
122
]
121
123
} ) ,
122
- commonjs ( )
124
+ commonjs ( ) ,
125
+ copy ( {
126
+ targets : [ { src : 'src/locale/*' , dest : 'dist/locale' } ]
127
+ } )
123
128
]
124
129
} ;
125
130
buildFormats . push ( esConfig ) ;
@@ -132,6 +137,7 @@ if (!argv.format || argv.format === 'cjs') {
132
137
output : {
133
138
compact : true ,
134
139
file : 'dist/litepie-datepicker.ssr.js' ,
140
+ inlineDynamicImports : true ,
135
141
format : 'cjs' ,
136
142
name : 'LitepieDatepicker' ,
137
143
exports : 'auto' ,
@@ -156,6 +162,7 @@ if (!argv.format || argv.format === 'iife') {
156
162
output : {
157
163
compact : true ,
158
164
file : 'dist/litepie-datepicker.min.js' ,
165
+ inlineDynamicImports : true ,
159
166
format : 'iife' ,
160
167
name : 'LitepieDatepicker' ,
161
168
exports : 'auto' ,
0 commit comments