Skip to content

Commit

Permalink
fix rollup copy locale
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhyuwa committed Mar 19, 2021
1 parent b138837 commit c8a7f10
Show file tree
Hide file tree
Showing 5 changed files with 506 additions and 22 deletions.
9 changes: 8 additions & 1 deletion build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import babel from '@rollup/plugin-babel';
import PostCSS from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import minimist from 'minimist';
import copy from 'rollup-plugin-copy';

// Get browserslist config and remove ie from es build targets
const esbrowserslist = fs
Expand Down Expand Up @@ -100,6 +101,7 @@ if (!argv.format || argv.format === 'es') {
external,
output: {
file: 'dist/litepie-datepicker.esm.js',
inlineDynamicImports: true,
format: 'esm',
exports: 'named'
},
Expand All @@ -119,7 +121,10 @@ if (!argv.format || argv.format === 'es') {
]
]
}),
commonjs()
commonjs(),
copy({
targets: [{ src: 'src/locale/*', dest: 'dist/locale' }]
})
]
};
buildFormats.push(esConfig);
Expand All @@ -132,6 +137,7 @@ if (!argv.format || argv.format === 'cjs') {
output: {
compact: true,
file: 'dist/litepie-datepicker.ssr.js',
inlineDynamicImports: true,
format: 'cjs',
name: 'LitepieDatepicker',
exports: 'auto',
Expand All @@ -156,6 +162,7 @@ if (!argv.format || argv.format === 'iife') {
output: {
compact: true,
file: 'dist/litepie-datepicker.min.js',
inlineDynamicImports: true,
format: 'iife',
name: 'LitepieDatepicker',
exports: 'auto',
Expand Down
Loading

0 comments on commit c8a7f10

Please sign in to comment.