[Feature]: Format <script type="module"></script>
mmuqiitf opened this issue · comments
M. Muqiit Faturrahman commented
Description
When i use a tag for <script type="module"></script>
in my blade component, it doesn't work for formatting like common <script></script>
. For example :
@push('scripts')
<script type="module">
$("#table-kategori").DataTable({
processing: true,
serverSide: true,ajax: "{{ route('kategori.list') }}",
columns: [{data: "DT_RowIndex",
name: "DT_RowIndex",orderable: false,searchable: false
},
{
data: "nama",name: "nama"
},
{
data: "jumlah_barang",
name: "jumlah_barang"
},
{
data: "created_at",
name: "created_at"
},
{
data: "action",
name: "action"
},
],
});
</script>
@endpush
When i hit save, javascript are not formatted properly. But when i remove type="module" it works properly formatted.
Suggested Solution
@push('scripts')
<script type="module">
$("#table-kategori").DataTable({
processing: true,
serverSide: true,
ajax: "{{ route('kategori.list') }}",
columns: [{
data: "DT_RowIndex",
name: "DT_RowIndex",
orderable: false,
searchable: false
},
{
data: "nama",
name: "nama"
},
{
data: "jumlah_barang",
name: "jumlah_barang"
},
{
data: "created_at",
name: "created_at"
},
{
data: "action",
name: "action"
},
],
});
</script>
@endpush
Alternatives
No response
Additional Context
No response
github-actions commented
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Scott Mankowitz commented
+1
M. Muqiit Faturrahman commented
I hope this feature is getting done, because i really need this
Shuhei Hayashibara commented
Fixed at v0.21.2