Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
89 changes: 46 additions & 43 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,51 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import vue from 'rollup-plugin-vue';
import autoprefixer from 'autoprefixer';
import { terser } from 'rollup-plugin-terser';
import pkg from './package.json';
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import babel from "rollup-plugin-babel";
import vue from "rollup-plugin-vue";
import autoprefixer from "autoprefixer";
import { terser } from "rollup-plugin-terser";
import pkg from "./package.json";

const babelOptions = {
extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.vue', '.ts'],
}
extensions: [".js", ".jsx", ".es6", ".es", ".mjs", ".vue", ".ts"]
};

export default [
// browser-friendly UMD build
{
input: pkg.main,
output: {
name: pkg.name,
file: pkg.browser,
format: 'umd',
sourcemap: false
},
plugins: [
resolve(),
commonjs(),
vue({
postcssPlugins: [autoprefixer()]
}),
babel(babelOptions),
//terser()
]
},
{
input: pkg.main,
output: [
{ file: pkg.module, format: 'es' }
],
plugins: [
resolve(),
commonjs(),
vue({
postcssPlugins: [autoprefixer ()]
}),
babel(babelOptions),
// terser()
]
}
// browser-friendly UMD build
{
input: pkg.main,
output: {
name: pkg.name,
file: pkg.browser,
exports: "named",
format: "umd",
sourcemap: false
},
plugins: [
resolve(),
commonjs(),
vue({
postcssPlugins: [autoprefixer()]
}),
babel(babelOptions),
terser()
]
},
{
input: pkg.main,
output: [
{
exports: "named",
file: pkg.module,
format: "es"
}
],
plugins: [
resolve(),
commonjs(),
vue({
postcssPlugins: [autoprefixer()]
}),
babel(babelOptions) ]
}
];
Loading