2019-04-15 18:35:01 +02:00
|
|
|
import babel from 'rollup-plugin-babel';
|
|
|
|
import resolve from 'rollup-plugin-node-resolve';
|
2019-04-16 09:38:15 +02:00
|
|
|
import commonjs from 'rollup-plugin-commonjs';
|
|
|
|
import svg from 'rollup-plugin-svg';
|
|
|
|
import postcss from 'rollup-plugin-postcss';
|
2019-04-15 18:35:01 +02:00
|
|
|
import pkg from './package.json';
|
|
|
|
|
|
|
|
export default {
|
2019-04-16 09:38:15 +02:00
|
|
|
input: './lib/src/index.js',
|
2019-04-15 18:35:01 +02:00
|
|
|
output: [
|
|
|
|
{
|
|
|
|
exports: 'named',
|
|
|
|
file: pkg.main,
|
|
|
|
format: 'cjs',
|
2019-04-16 09:38:15 +02:00
|
|
|
sourceMap: true,
|
2019-04-15 18:35:01 +02:00
|
|
|
name: 'strapi-helper-plugin',
|
2019-04-16 16:55:53 +02:00
|
|
|
compact: true,
|
2019-04-15 18:35:01 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
exports: 'named',
|
2019-04-16 09:38:15 +02:00
|
|
|
sourceMap: true,
|
2019-04-15 18:35:01 +02:00
|
|
|
file: pkg.module,
|
|
|
|
format: 'es',
|
|
|
|
name: 'strapi-helper-plugin',
|
2019-04-16 16:55:53 +02:00
|
|
|
compact: true,
|
2019-04-15 18:35:01 +02:00
|
|
|
},
|
|
|
|
],
|
2019-04-16 09:38:15 +02:00
|
|
|
|
2019-04-15 18:35:01 +02:00
|
|
|
plugins: [
|
2019-04-16 09:38:15 +02:00
|
|
|
postcss({
|
|
|
|
modules: true,
|
|
|
|
}),
|
2019-04-15 18:35:01 +02:00
|
|
|
babel({
|
|
|
|
exclude: 'node_modules/**',
|
|
|
|
}),
|
2019-04-16 09:38:15 +02:00
|
|
|
resolve(),
|
|
|
|
commonjs(),
|
|
|
|
svg(),
|
2019-04-16 16:55:53 +02:00
|
|
|
require('rollup-plugin-sizes')(),
|
2019-04-16 09:38:15 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
external: [
|
|
|
|
...Object.keys(pkg.dependencies || {}),
|
|
|
|
...Object.keys(pkg.peerDependencies || {}),
|
2019-04-15 18:35:01 +02:00
|
|
|
],
|
|
|
|
};
|