These are errors:
- GET http://eprofile.local/js/node_modules_xlsx_xlsx_js.js net::ERR_ABORTED 404 (Not Found)
- Uncaught (in promise) ChunkLoadError: Loading chunk node_modules_xlsx_xlsx_js failed.
The function I am doing is that when I enter an Excel file into the input, the excel sheet will be displayed on the interface.
My template tag
<template>
<div>
<div class="form-group">
<label class="form-label">Excel File</label>
<input class="form-control" type="file" @change="onFileChange">
</div>
<xlsx-read :file="file">
<xlsx-table></xlsx-table>
</xlsx-read>
</div>
</template>
This is script tag
<script>
import { XlsxRead, XlsxTable } from "vue-xlsx/dist/vue-xlsx.es.js";
export default {
components: {
XlsxRead,
XlsxTable
},
data() {
return {
file: null
};
},
methods: {
onFileChange(e) {
this.file = e.target.files ? e.target.files[0] : null;
},
},
};
</script>