{"_id":"@adonisjs/vite-plugin-adonis","name":"@adonisjs/vite-plugin-adonis","dist-tags":{"latest":"1.0.0-beta.0"},"versions":{"1.0.0-beta.0":{"name":"@adonisjs/vite-plugin-adonis","version":"1.0.0-beta.0","description":"Vite plugin for AdonisJS applications","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs"},"./inertia":{"types":"./dist/inertia.d.ts","require":"./dist/inertia.cjs","import":"./dist/inertia.mjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","typesVersions":{"*":{"*":["./dist/*","./dist/index.d.ts"]}},"keywords":["adonisjs","vite","plugin"],"publishConfig":{"access":"public"},"author":{"name":"Julien Ripouteau","email":"julien@ripouteau.com"},"license":"MIT","dependencies":{"@poppinss/dev-utils":"^2.0.3","defu":"^6.1.0"},"peerDependencies":{"vite":"^3.0.0"},"devDependencies":{"@adonisjs/mrm-preset":"^5.0.3","@adonisjs/require-ts":"^2.0.13","@japa/assert":"^1.3.6","@japa/runner":"^2.2.2","@japa/spec-reporter":"^1.3.2","@types/node":"^18.11.3","bumpp":"^8.2.1","c8":"^7.12.0","commitizen":"^4.2.5","cz-conventional-changelog":"^3.3.0","del-cli":"^5.0.0","eslint":"^8.26.0","eslint-config-prettier":"^8.5.0","eslint-plugin-adonis":"^2.1.1","eslint-plugin-prettier":"^4.2.1","github-label-sync":"^2.2.0","husky":"^8.0.1","mrm":"^4.1.13","prettier":"^2.7.1","rollup":"^3.2.3","sass":"^1.55.0","ts-node":"^10.9.1","typescript":"^4.8.4","unbuild":"^0.9.4","vite":"^3.1.8"},"eslintConfig":{"extends":["plugin:adonis/typescriptPackage","prettier"],"plugins":["prettier"],"rules":{"prettier/prettier":["error",{"endOfLine":"auto"}]}},"eslintIgnore":["build"],"prettier":{"trailingComma":"es5","semi":false,"singleQuote":true,"useTabs":false,"quoteProps":"consistent","bracketSpacing":true,"arrowParens":"always","printWidth":100},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"np":{"contents":".","anyBranch":false},"scripts":{"mrm":"mrm --preset=@adonisjs/mrm-preset","pretest":"npm run lint","test":"node -r ts-node/register bin/test.ts","coverage":"c8 pnpm test","clean":"del-cli build","compile":"npm run lint && npm run clean && tsc","dev":"unbuild --stub","build":"unbuild","lint":"eslint . --ext=.ts","format":"prettier --write .","commit":"git-cz","release":"bumpp --commit --push --tag && pnpm publish","version":"npm run build","sync-labels":"github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json Julien-R44/vite-plugin-adonis"},"_id":"@adonisjs/vite-plugin-adonis@1.0.0-beta.0","_integrity":"sha512-a75bHE0wEw/Pa0/xBC6LeMdXmNl8c9shT+h5mLyb7bMV/2ZhBjavQ0LeqHED6igz9qQuhN68J57f6lgEbIwQ1A==","_resolved":"C:\\Users\\Julien\\AppData\\Local\\Temp\\c95d8ddb382bd193c95552d38bdd12a6\\adonisjs-vite-plugin-adonis-1.0.0-beta.0.tgz","_from":"file:adonisjs-vite-plugin-adonis-1.0.0-beta.0.tgz","_nodeVersion":"18.2.0","_npmVersion":"8.9.0","dist":{"integrity":"sha512-a75bHE0wEw/Pa0/xBC6LeMdXmNl8c9shT+h5mLyb7bMV/2ZhBjavQ0LeqHED6igz9qQuhN68J57f6lgEbIwQ1A==","shasum":"935931262c9c7c828bc0cc396395eaa67d2026af","tarball":"https://registry.npmjs.org/@adonisjs/vite-plugin-adonis/-/vite-plugin-adonis-1.0.0-beta.0.tgz","fileCount":8,"unpackedSize":19388,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJJEGssVYoHtICjLGcxThMvJlVtsY56z1JG5Twm/BhtAiEA30MKVGHFmZnM7yvl+DEaz6HehlFe3Zp7gRTbBVa4g2M="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgm2iACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmom1Q//dG3rStUS6yaMMibhZaMkWclA8axksLz0dgSMNxFX0Sc6r4EO\r\nK5MQfkyklUVrOWJYuoOzCyk1G4TFwLAyPlGgAJfGEfjjS3GZvd7DXOjmQPuZ\r\nh9tGgUi0OzYjPorBtW01ldeCNLbpP9QzjVD4jTuMh5/uv50d8rasnBblLwie\r\nnxl+mcwmjXxrD8Fy/Am1P84Mp6/pCvb1Pp5Pxo3b8TKZqQicRTeLVBogeVmm\r\nedBPSXzOdOpDhtE7FX5SJsLVKyWmyeAFM6F9xC7WlqRIMD7dBvcIH02VnbNk\r\nXJNy+FHeU07q2NkPaVxJ3ADVWmMo0kz+A3butt+6FwuOE6XYHt+zcyr8qA/T\r\nB58BL0eqDE/JhjcVrBqTkx/+WJWS5fdO+bMonMzuhpH7i4kvqtVOlR0vhKVX\r\n+zOIEw66OOYxAC64ROwAFG/O2SB9Xg7rvzeHOg7YtfiNU6g+75oetLCNJ9fw\r\noBEvJ1jGDpt6zPHjyhYFY5ymVJtezhcZk+oW8X33zffwrAinG2VgrXjWN+0A\r\nXS9ArsJPZf2m1TL8n52JspFlTrWfEJV5Djn+YbrFxO6G/binCyQsgKmLVYOu\r\nEw0ls9QARxTnkrAx2vlpeMZOxIagE4BLCVLJV1GjfFV6scMehTJax75DwUW9\r\nE7BpCrf2vr3ztc39ZqQ3bm760blglnfViPk=\r\n=ARZC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"julien-r44","email":"julien@ripouteau.com"},"directories":{},"maintainers":[{"name":"julien-r44","email":"julien@ripouteau.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vite-plugin-adonis_1.0.0-beta.0_1669492130404_0.9727414874114957"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-26T19:48:50.331Z","1.0.0-beta.0":"2022-11-26T19:48:50.566Z","modified":"2022-11-26T19:48:50.713Z"},"maintainers":[{"name":"julien-r44","email":"julien@ripouteau.com"}],"description":"Vite plugin for AdonisJS applications","keywords":["adonisjs","vite","plugin"],"author":{"name":"Julien Ripouteau","email":"julien@ripouteau.com"},"license":"MIT","readme":"# vite-plugin-adonis\n> Vite plugin for AdonisJS\n\n[![npm-image]][npm-url] [![license-image]][license-url] [![typescript-image]][typescript-url]\n\nThis plugin allows you to use AdonisJS with Vite as the assets bundler.\n\n## Installation\n\n```bash\nnpm i -D vite-plugin-adonis\n```\n\n## Usage\n\n```ts\n\nimport { defineConfig } from 'vite'\nimport Adonis from 'vite-plugin-adonis'\n\nexport default defineConfig({\n  plugins: [\n    Adonis({\n      entryPoints: {\n        app: ['resources/js/app.ts'],\n      }\n    })\n  ]\n})\n```\n\n## Why and how ? \n\nThis plugin is needed for the following reasons:\n\n### Keep compatible API\n\nThe first Assets Bundler that was implemented for AdonisJS was Webpack Encore. Two things webpack encore is doing when you run the dev server, is :\n- Generating a manifest.json file that contains all the assets with some metadata\n- Generating a entrypoints.json file\n\nThese two files are used by AdonisJS to correctly load the assets in the views. Vite doesn't generate manifest file in dev mode, but we won't need it. The only drawback is, while in dev mode, AdonisJS won't be able to throw an error if you try to load an asset that doesn't exist.\n\nHowever the entrypoints.json file is needed by AdonisJS, basically for the `entryPointStyles('entryPointName')` and `entryPointScripts('entryPointName')` helpers. This plugin will generate the entrypoints.json file based on the entryPoints option you pass to the plugin.\n\n### Reload\n\nThe plugin also add a little method that will watch your `.edge` files and full-reload the page when a change is detected. \n\n### Configuration\n\nThe last thing this plugin is doing, is, basically just pre-configuring Vite for you. It will add all configuration needed to make AdonisJS work with Vite.\n\n[npm-image]: https://img.shields.io/npm/v/vite-plugin-adonis.svg?style=for-the-badge&logo=npm\n[npm-url]: https://npmjs.org/package/vite-plugin-adonis \"npm\"\n\n[license-image]: https://img.shields.io/npm/l/vite-plugin-adonis?color=blueviolet&style=for-the-badge\n[license-url]: LICENSE.md \"license\"\n\n[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript\n[typescript-url]:  \"typescript\"\n","readmeFilename":"README.md"}