Skip to content

Commit ca5aa22

Browse files
committed
build: fix rollup warnings
1 parent ac53405 commit ca5aa22

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

rollup.config.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,27 @@ import vue from "rollup-plugin-vue";
55
import css from "rollup-plugin-css-only";
66
import pkg from "./package.json";
77

8-
const resolve = _path => path.resolve(__dirname, _path);
8+
const resolve = (_path) => path.resolve(__dirname, _path);
99

1010
export default {
1111
input: resolve("./src/main.js"),
1212
output: [
1313
{
1414
file: pkg.main,
1515
name: "VueLive",
16-
format: "umd"
16+
format: "umd",
17+
exports: "named", // remove warning about mixed exports
18+
globals: {
19+
"hash-sum": "vueLiveHashSum",
20+
"vue-inbrowser-compiler": "vueInbrowserCompiler",
21+
"vue-prism-editor": "VuePrismEditor",
22+
debounce: "debounce",
23+
},
1724
},
1825
{
1926
file: pkg.module,
20-
format: "es" // the preferred format
21-
}
27+
format: "es", // the preferred format
28+
},
2229
],
2330
plugins: [
2431
commonjs(),
@@ -27,14 +34,14 @@ export default {
2734
// avoid using babel.config.js. It kills es6 modules for ie compatibility
2835
configFile: "./babel.rollup.js",
2936
extensions: [".js"],
30-
runtimeHelpers: true
37+
runtimeHelpers: true,
3138
}),
3239
vue(),
33-
css()
40+
css(),
3441
],
3542
external: [
3643
...Object.keys(pkg.dependencies),
3744
// make sure jsx schema is loaded from external
38-
"prismjs/components/prism-jsx.min"
39-
]
45+
"prismjs/components/prism-jsx.min",
46+
],
4047
};

0 commit comments

Comments
 (0)