Try adjusting the export/import as follows, does that resolve the issue?
// js-grid-helper.js
const TABLE_COLUMNS_DATA = [
{ name: 'column_1', title: 'Column 1', type: 'text'}
,{ name: 'column_2', title: 'Column 2', type: 'text'}
,{ name: 'column_3', title: 'Column 3', type: 'text'}
];
export default TABLE_COLUMNS_DATA;
// page.js
import TABLE_COLUMNS from "./test"; // note that we have the freedom to use import TABLE_COLUMNS instead of import TABLE_COLUMNS_DATA, because TABLE_COLUMNS_DATA was default export
console.log(TABLE_COLUMNS); // [ { name: 'column_1', title: 'Column 1', type: 'text'} ,{ name: 'column_2', title: 'Column 2', type: 'text'} ,{ name: 'column_3', title: 'Column 3', type: 'text'} ]
$('#my-table').jsGrid({
/* ... */
fields: TABLE_COLUMNS,
});
ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export