From b371fad01045e545599110c8a9b612a6ee54f815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernd=20Artmu=CC=88ller?= Date: Tue, 25 Aug 2020 12:35:07 +0200 Subject: [PATCH] fix npm --- package.json | 4 ++-- rollup.config.js | 2 +- src/index.ts | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/index.ts diff --git a/package.json b/package.json index 5ebaa5e..e7f8725 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "dist/index.js", "module": "dist/index.es.js", "browser": "dist/index.bundle.js", - "source": "src/virchual.ts", - "types": "dist/virchual.d.ts", + "source": "src/index.ts", + "types": "dist/index.d.ts", "unpkg": "dist/index.bundle.js", "files": [ "src", diff --git a/rollup.config.js b/rollup.config.js index f975573..bee2837 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -11,7 +11,7 @@ import bundleSize from 'rollup-plugin-bundle-size'; const isDevelopment = process.env.NODE_ENV === 'development'; export default { - input: 'src/virchual.ts', // our source file + input: 'src/index.ts', // our source file output: [ { file: pkg.main, diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..16eca01 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,8 @@ +import { Virchual } from './virchual'; + +export { Virchual }; + +// For CommonJS default export support +module.exports = Virchual; +module.exports.default = Virchual; +module.exports.__esModule = true;