hunk.code_window:     },
       disconnect: () => {
         inspectService.send('disconnect');
         window.removeEventListener('message', messageHandler);
       }
     } as Inspector;
   }
   export function createWindowReceiver(
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit:       sub.unsubscribe();
  
hunk.file_path: packages/xstate-inspect/src/browser.ts
hunk.type: add
file: import typescript from 'rollup-plugin-typescript2';
  
  const createTsPlugin = () =>
    typescript({
      clean: true,
      tsconfigOverride: {
        compilerOptions: {
          declaration: true
        }
      }
    });
  
  const createNpmConfig = ({ input, output }) => ({
    input,
    output,
    preserveModules: true,
    external: ['xstate', 'xstate/lib/utils'],
    plugins: [createTsPlugin()]
  });
  
  export default [
    createNpmConfig({
      input: 'src/index.ts',
      output: [
        {
          dir: 'es',
          format: 'esm'
        }
      ]
    }),
    createNpmConfig({
      input: ['src/index.ts', 'src/server.ts'],
      output: [
        {
          dir: 'lib',
          format: 'cjs'
        }
      ]
    })
  ];
  