UNPKG

620 BJavaScriptView Raw
1import nodeResolve from "rollup-plugin-node-resolve";
2
3export default {
4 input: "src/index.js",
5 output: {
6 file: "controls.js",
7 name: "controls",
8 format: "umd",
9 },
10 plugins: [
11 nodeResolve()
12 ],
13 onwarn: function (warning, warn) {
14 if (warning.code === "CIRCULAR_DEPENDENCY") return;
15 if (warning.code === "UNRESOLVED_IMPORT") {
16 throw new Error(
17 "Couldn't resolve the dependency " + warning.source +
18 " (from " + warning.importer + "): sometimes you can" +
19 " fix this with 'npm install', or add '" + warning.source +
20 " to 'external'. See: " + warning.url
21 );
22 }
23 warn(warning);
24 }
25};
26