NSFWjs and Vite/Nuxt
Before you read: (It's probably more of a package issue, but I need it to work with Nuxt and Vite) I need it done asap and can offer a small tip
Has anyone used the nsfwjs https://www.npmjs.com/package/nsfwjs package with nuxt? I am having issue in my Nuxt 3 (with spa mode) project. I believe the problem is related to Vite because the package works correctly in a barebone React project as per the documentation.
In particular:
with the following imports as per docs
It throws an error right after this line:
const model = await nsfwjs.load("MobileNetV2Mid");
Does anyone have any idea how to fix that package or make vite import .js files correctly?npm
nsfwjs
Detect NSFW content client-side. Latest version: 4.1.0, last published: 7 months ago. Start using nsfwjs in your project by running
npm i nsfwjs
. There are 12 other projects in the npm registry using nsfwjs.0 Replies