Files
mini-graph-card/rollup.config.js
Jérôme W bbde47b381 chore(ci): Add Devcontainer and github action for auto-release management (#537)
* Add devcontainer

* Add github-actions and semantic-release
2021-01-17 17:07:56 +01:00

33 lines
661 B
JavaScript
Executable File

import resolve from 'rollup-plugin-node-resolve';
import json from '@rollup/plugin-json';
import serve from 'rollup-plugin-serve';
const dev = process.env.ROLLUP_WATCH;
const serveopts = {
contentBase: ['./dist'],
host: '0.0.0.0',
port: 5000,
allowCrossOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
};
export default {
input: 'src/main.js',
output: {
file: 'dist/mini-graph-card-bundle.js',
format: 'umd',
name: 'MiniGraphCard',
sourcemap: dev ? true : false,
},
plugins: [
json({
include: 'package.json',
preferConst: true,
}),
resolve(),
dev && serve(serveopts),
],
};