Import .obj files as strings in Vite, Rollup, Webpack, and more. Version 0.1.2 is the latest stable release. Built on the unplugin framework, it provides seamless integration across multiple build tools with a unified API. The plugin converts .obj files to raw text, enabling use with three.js or custom parsers. It includes TypeScript type declarations and supports SvelteKit, Nuxt, and Vue CLI. Compared to alternatives like raw-loader or asset modules, it offers framework-agnostic zero-config setup and consistent import syntax across bundlers.
npm install unplugin-objVerified import paths — ran on the pinned version, not inferred.
Shows Vite configuration with unplugin-obj and importing an .obj file as a string.
Add type declarations via 'unplugin-obj/obj' in tsconfig.json or a reference directive.
Use correct import: import ObjFileImport from 'unplugin-obj/vite';
Use const ObjFileImport = require('unplugin-obj/webpack');Pin exact version and test updates carefully.
Add 'unplugin-obj/obj' to tsconfig.json types array or add a .d.ts file with /// <reference types="unplugin-obj/obj" />.
Change import to e.g. import ObjFileImport from 'unplugin-obj/vite';
Add type declarations for .obj files (see above).
No dependency data recorded yet.