Skip to content

Commit c8a7f10

Browse files
committed
fix rollup copy locale
1 parent b138837 commit c8a7f10

File tree

5 files changed

+506
-22
lines changed

5 files changed

+506
-22
lines changed

build/rollup.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import babel from '@rollup/plugin-babel';
1010
import PostCSS from 'rollup-plugin-postcss';
1111
import { terser } from 'rollup-plugin-terser';
1212
import minimist from 'minimist';
13+
import copy from 'rollup-plugin-copy';
1314

1415
// Get browserslist config and remove ie from es build targets
1516
const esbrowserslist = fs
@@ -100,6 +101,7 @@ if (!argv.format || argv.format === 'es') {
100101
external,
101102
output: {
102103
file: 'dist/litepie-datepicker.esm.js',
104+
inlineDynamicImports: true,
103105
format: 'esm',
104106
exports: 'named'
105107
},
@@ -119,7 +121,10 @@ if (!argv.format || argv.format === 'es') {
119121
]
120122
]
121123
}),
122-
commonjs()
124+
commonjs(),
125+
copy({
126+
targets: [{ src: 'src/locale/*', dest: 'dist/locale' }]
127+
})
123128
]
124129
};
125130
buildFormats.push(esConfig);
@@ -132,6 +137,7 @@ if (!argv.format || argv.format === 'cjs') {
132137
output: {
133138
compact: true,
134139
file: 'dist/litepie-datepicker.ssr.js',
140+
inlineDynamicImports: true,
135141
format: 'cjs',
136142
name: 'LitepieDatepicker',
137143
exports: 'auto',
@@ -156,6 +162,7 @@ if (!argv.format || argv.format === 'iife') {
156162
output: {
157163
compact: true,
158164
file: 'dist/litepie-datepicker.min.js',
165+
inlineDynamicImports: true,
159166
format: 'iife',
160167
name: 'LitepieDatepicker',
161168
exports: 'auto',

0 commit comments

Comments
 (0)