Skip to content

Commit

Permalink
chore: sort import
Browse files Browse the repository at this point in the history
  • Loading branch information
Oc1S committed Jun 27, 2024
1 parent 82aee62 commit 89fe63a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
7 changes: 4 additions & 3 deletions chrome-extension/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'vite';
import { resolve } from 'path';
import { watchRebuildPlugin } from '@ehentai-helper/hmr';
import libAssetsPlugin from '@laynezh/vite-plugin-lib-assets';
import { resolve } from 'path';
import { defineConfig } from 'vite';

import makeManifestPlugin from './utils/plugins/make-manifest-plugin';
import { watchRebuildPlugin } from '@ehentai-helper/hmr';

const rootDir = resolve(__dirname);
const libDir = resolve(rootDir, 'lib');
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-utils/lib/manifest-parser/impl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ManifestParserInterface, Manifest } from './type';
import { Manifest, ManifestParserInterface } from './type';

export const ManifestParserImpl: ManifestParserInterface = {
convertManifestToString: (manifest, env) => {
Expand Down
3 changes: 2 additions & 1 deletion packages/hmr/lib/initReloadServer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node

import { WebSocket, WebSocketServer } from 'ws';

import { LOCAL_RELOAD_SOCKET_PORT, LOCAL_RELOAD_SOCKET_URL } from './constant';
import MessageInterpreter from './interpreter';

Expand All @@ -26,7 +27,7 @@ function initReloadServer() {
}
if (message.type === 'build_complete') {
clientsThatNeedToUpdate.forEach((ws: WebSocket) =>
ws.send(MessageInterpreter.send({ type: 'do_update', id: message.id })),
ws.send(MessageInterpreter.send({ type: 'do_update', id: message.id }))
);
}
});
Expand Down
1 change: 0 additions & 1 deletion packages/hmr/lib/plugins/make-entry-point-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function makeEntryPointPlugin(): PluginOption {
const replacedSource = String(module.source).replaceAll(originalFileName, newFileName);
module.source = '';
fs.writeFileSync(path.resolve(outputDir, newFileName), replacedSource);
break;
}
break;
case 'chunk': {
Expand Down
7 changes: 4 additions & 3 deletions packages/hmr/lib/plugins/watch-rebuild-plugin.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as fs from 'fs';
import path from 'path';
import type { PluginOption } from 'vite';
import { WebSocket } from 'ws';
import MessageInterpreter from '../interpreter';

import { LOCAL_RELOAD_SOCKET_URL } from '../constant';
import * as fs from 'fs';
import path from 'path';
import MessageInterpreter from '../interpreter';

type PluginConfig = {
onStart?: () => void;
Expand Down
4 changes: 2 additions & 2 deletions pages/popup/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'vite';
import { watchRebuildPlugin } from '@ehentai-helper/hmr';
import react from '@vitejs/plugin-react-swc';
import { resolve } from 'path';
import { watchRebuildPlugin } from '@ehentai-helper/hmr';
import { defineConfig } from 'vite';

const rootDir = resolve(__dirname);
const srcDir = resolve(rootDir, 'src');
Expand Down

0 comments on commit 89fe63a

Please sign in to comment.