Skip to content

Commit b4b7f75

Browse files
committed
refactor(linter/plugins): flatten directory structure of dist
1 parent fab5ed5 commit b4b7f75

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/oxlint/src-js/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ let lintFile: typeof lintFileWrapper | null = null;
99
function loadPluginWrapper(path: string): Promise<string> {
1010
if (loadPlugin === null) {
1111
const require = createRequire(import.meta.url);
12-
({ loadPlugin, lintFile } = require('./plugins/index.js'));
12+
// `plugins.js` is in root of `dist`. See `tsdown.config.ts`.
13+
({ loadPlugin, lintFile } = require('./plugins.js'));
1314
}
1415
return loadPlugin(path);
1516
}

apps/oxlint/tsdown.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ const commonConfig: UserConfig = {
2323
// Only generate `.d.ts` file for main export, not for CLI
2424
export default defineConfig([
2525
{
26-
entry: ['src-js/cli.ts', 'src-js/plugins/index.ts'],
26+
entry: {
27+
cli: 'src-js/cli.ts',
28+
plugins: 'src-js/plugins/index.ts',
29+
},
2730
...commonConfig,
2831
dts: false,
2932
},

0 commit comments

Comments
 (0)