Reputation: 6496
A ts module with an import
but no export
calls named ./snippets.ts
A ts module called ./main.ts
A tsconfig as follows...
{
"compilerOptions": {
"target": "ESNext",
"module": "commonjs",
"allowJs": true,
"checkJs": true,
"sourceMap": true,
"downlevelIteration": true,
"noImplicitAny": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"baseUrl": ".",
},
"exclude": [
"node_modules"
]
}
How do I import the ./snippets file in the ./main module so as I can be assured that ./snippets has run before ./main?
I have tried import from "./snippet";
and import * as arbitrarySymbol from "./snippet";
and variations with no success.
Upvotes: 0
Views: 567