- initial commit
This commit is contained in:
48
rollup.config.js
Normal file
48
rollup.config.js
Normal file
@@ -0,0 +1,48 @@
|
||||
import typescript from "@wessberg/rollup-plugin-ts";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import external from "rollup-plugin-peer-deps-external";
|
||||
import { camelCase } from "lodash";
|
||||
import { uglify } from "rollup-plugin-uglify";
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import pkg from "./package.json";
|
||||
import bundleSize from "rollup-plugin-bundle-size";
|
||||
import copy from "rollup-plugin-copy";
|
||||
|
||||
const globals = {};
|
||||
|
||||
const libraryName = "unom-style";
|
||||
|
||||
export default {
|
||||
input: `src/${libraryName}.ts`,
|
||||
output: [
|
||||
{
|
||||
file: pkg.main,
|
||||
name: camelCase(libraryName),
|
||||
format: "umd",
|
||||
globals: globals,
|
||||
sourcemap: true,
|
||||
},
|
||||
{
|
||||
file: pkg.module,
|
||||
format: "es",
|
||||
exports: "named",
|
||||
globals: globals,
|
||||
sourcemap: true,
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
copy({
|
||||
targets: [
|
||||
{ src: "src/assets/easings.css", dest: "build/easings/easings.css" },
|
||||
],
|
||||
}),
|
||||
external(),
|
||||
resolve(),
|
||||
typescript(),
|
||||
uglify(),
|
||||
bundleSize(),
|
||||
commonjs({
|
||||
include: ["node_modules/**"],
|
||||
}),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user