diff --git a/src/index.ts b/src/index.ts index c4053a7..bad7296 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import { Component } from 'vue'; type createContext = (defaultValue: unknown) => { Provider: Component; Consumer: Component }; -export const createContext: createContext = (defaultValue) => { +module.exports.createContext = (defaultValue) => { const _key = `_${Date.now()}${Math.random()}`; const _context = { from: _key, diff --git a/tsconfig.json b/tsconfig.json index 48e359c..f03a263 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "outDir": "dist", - "module": "es2015", + "module": "commonjs", "target": "es5", "moduleResolution": "node", "strict": true,