Skip to content

Commit

Permalink
fix: issues vdesjs#21
Browse files Browse the repository at this point in the history
  • Loading branch information
AkaraChen committed Jun 9, 2023
1 parent 85ecb84 commit 7b54796
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.1.0",
"description": "A vite plugin for the Monaco Editor",
"main": "dist/index.js",
"type": "module",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
Expand Down Expand Up @@ -48,5 +49,11 @@
},
"peerDependencies": {
"monaco-editor": ">=0.33.0"
},
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
}
}
}
4 changes: 2 additions & 2 deletions src/workerMiddleware.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Connect, ResolvedConfig } from 'vite';
import { getWorks, IMonacoEditorOpts, isCDN, resolveMonacoPath } from './index';
import { IWorkerDefinition, languageWorksByLabel } from './lnaguageWork';
const esbuild = require('esbuild');
import * as esbuild from 'esbuild'
import * as fs from 'fs';
import path = require('path');
import * as path from 'path'

export function getFilenameByEntry(entry: string) {
entry = path.basename(entry, 'js');
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"outDir": "dist",
"target": "ES6",
"module": "commonjs",
"module": "ES6",
"moduleResolution": "node",
"declaration": true,
}
Expand Down

0 comments on commit 7b54796

Please sign in to comment.