rollup.config.js 523 B

12345678910111213141516171819202122232425262728
  1. import resolve from "rollup-plugin-node-resolve";
  2. import commonjs from "rollup-plugin-commonjs";
  3. const onwarn = function(warning) {
  4. if (warning.code === 'THIS_IS_UNDEFINED') return;
  5. console.warn(warning.message);
  6. };
  7. export const config = [
  8. {
  9. input: "./lib/src/chat-room/chat-room.js",
  10. output: {
  11. name: "main",
  12. file: "public/index.js",
  13. format: "umd",
  14. },
  15. plugins: [
  16. resolve({
  17. browser: true,
  18. }),
  19. commonjs(),
  20. ],
  21. onwarn
  22. },
  23. ];
  24. export default config;