2020-04-28 09:47:35 +00:00
|
|
|
import resolve from '@rollup/plugin-node-resolve';
|
|
|
|
import commonjs from '@rollup/plugin-commonjs';
|
|
|
|
import buble from '@rollup/plugin-buble';
|
|
|
|
|
2021-05-05 16:24:26 +00:00
|
|
|
const names = ['offline']; //, 'iconify'];
|
|
|
|
const component = 'Icon';
|
2020-04-28 09:47:35 +00:00
|
|
|
|
2021-05-05 16:24:26 +00:00
|
|
|
const config = [];
|
|
|
|
|
|
|
|
// Write all packages
|
|
|
|
names.forEach(name => {
|
|
|
|
// ES module
|
|
|
|
config.push({
|
2020-04-28 09:47:35 +00:00
|
|
|
input: `lib/${name}.js`,
|
|
|
|
output: [
|
|
|
|
{
|
2021-05-05 16:24:26 +00:00
|
|
|
file: `dist/${name}.mjs`,
|
2020-04-28 09:47:35 +00:00
|
|
|
format: 'esm',
|
|
|
|
exports: 'named',
|
|
|
|
},
|
|
|
|
],
|
2020-08-26 17:01:02 +00:00
|
|
|
external: ['vue'],
|
2020-04-28 09:47:35 +00:00
|
|
|
plugins: [resolve(), commonjs(), buble()],
|
2021-05-05 16:24:26 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// UMD module
|
|
|
|
config.push({
|
2020-04-28 09:47:35 +00:00
|
|
|
input: `lib/${name}.js`,
|
|
|
|
output: [
|
|
|
|
{
|
2021-05-05 16:24:26 +00:00
|
|
|
file: `dist/${name}.js`,
|
2020-04-28 09:47:35 +00:00
|
|
|
format: 'umd',
|
2021-05-05 16:24:26 +00:00
|
|
|
name: component,
|
2020-04-28 09:47:35 +00:00
|
|
|
exports: 'named',
|
2020-08-26 17:01:02 +00:00
|
|
|
globals: {
|
|
|
|
vue: 'Vue',
|
|
|
|
},
|
2020-04-28 09:47:35 +00:00
|
|
|
},
|
|
|
|
],
|
2020-08-26 17:01:02 +00:00
|
|
|
external: ['vue'],
|
2020-04-28 09:47:35 +00:00
|
|
|
plugins: [resolve(), commonjs(), buble()],
|
2021-05-05 16:24:26 +00:00
|
|
|
});
|
|
|
|
});
|
2020-04-28 09:47:35 +00:00
|
|
|
|
|
|
|
export default config;
|