Package Exports
- prettier-plugin-blade-volt
- prettier-plugin-blade-volt/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (prettier-plugin-blade-volt) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Prettier Blade Plugin
This plugin has been https://github.com/shufo/prettier-plugin-blade extended for use with Livewire Volt.
The original functionality is retained, with the addition of the option addPrettierIgnoreForVolt.
By setting this option to true, the <?php start tag and the closing tag ? > before and after <! -- prettier-ignore-start --> and <! -- prettier-ignore-end --> before and after the closing tag `?
This allows you to exclude prettier formatting between php tags in the blade.
Installation
npm install --save-dev @nxsdev/rettier-plugin-blade-volt
# yarn
yarn add -D @nxsdev/rettier-plugin-blade-volt
# pnpm
pnpm add -D @nxsdev/rettier-plugin-blade-voltthen, add in your Prettier configuration:
{
"plugins": ["@nxsdev/prettier-plugin-blade-volt"],
"overrides": [
{
"files": ["*.blade.php"],
"options": {
"parser": "blade",
"tabWidth": 4,
"addPrettierIgnoreForVolt": true
}
}
]
}Since the rest is basically the same, please refer to this GitHub.