With this code I am able to successfully import / access variables and functions when they are individually exported, but I want to be able to export the entire file in a single declaration. I've tried a number of variations from here but cannot achieve this.
script.js
import * as testImport from './test.js';
console.log( testImport.testVar ); // Returns 'Test Variable'
console.log( testImport.testFunc() ); // Returns 'Test Function'
test.js
export let testVar = 'Test Variable';
export function testFunc() {
return 'Test Function';
}
desired ( without individual 'exports' )
let testVar = 'Test Variable';
function testFunc() {
return 'Test Function';
}
export * // ?