Skip to content

Commit

Permalink
feat: 🎸 plugin-nsfw
Browse files Browse the repository at this point in the history
  • Loading branch information
meetqy committed Feb 24, 2023
1 parent c76764a commit 251c083
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/plugin-nsfw/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { join } from "path";
let model: nsfw.NSFWJS;

const getModel = async () => {
const file = join(__dirname, "./nsfw_model/model/");
const file = join(__dirname, "../nsfw_model/model/");
if (!model) {
model = await nsfw.load(`file://${file}`, { size: 299 });
}
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-nsfw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"files": [
"dist",
"prisma/schema.prisma"
"nsfw_model"
],
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/lib/index.d.ts",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
Expand Down
7 changes: 7 additions & 0 deletions packages/plugin-nsfw/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";

export default defineConfig({
plugins: [
dts({
// 是否跳过类型诊断
skipDiagnostics: true,
}),
],
build: {
lib: {
entry: "lib/index.ts",
Expand Down

0 comments on commit 251c083

Please sign in to comment.