diff --git a/config/rollup.js b/config/rollup.js index 7b6a459..f8bf90e 100644 --- a/config/rollup.js +++ b/config/rollup.js @@ -43,7 +43,7 @@ const banner = `/*! */ export default [ { - input: "src/index.ts", + input: pkg.source, external, plugins, output: [ @@ -52,28 +52,28 @@ export default [ freeze: false, sourcemap, format: "cjs", - file: "dist/pixi-gif.cjs.js", + file: pkg.main, }, { banner, freeze: false, sourcemap, format: "esm", - file: "dist/pixi-gif.esm.js", + file: pkg.module, }, ], }, { - input: "src/index.ts", + input: pkg.source, external, plugins, output: { banner, freeze: false, format: "iife", - name: "PIXI.gif", + name: pkg.namespace, sourcemap, - file: "dist/pixi-gif.js", + file: pkg.bundle, globals: { "@pixi/loaders": "PIXI", "@pixi/core": "PIXI", diff --git a/package.json b/package.json index 71ed118..7ab386a 100644 --- a/package.json +++ b/package.json @@ -2,19 +2,17 @@ "name": "@pixi/gif", "version": "1.1.1", "description": "Animated GIF Runtime for PixiJS", + "source": "./src/index.ts", "main": "./dist/pixi-gif.cjs.js", - "module": "./dist/pixi-gif.esm.js", + "module": "./dist/pixi-gif.esm.mjs", + "bundle": "./dist/pixi-gif.js", "types": "./index.d.ts", + "namespace": "PIXI.gif", "exports": { ".": { - "import": { - "types": "./index.d.ts", - "default": "./dist/pixi-gif.esm.js" - }, - "require": { - "types": "./index.d.ts", - "default": "./dist/pixi-gif.cjs.js" - } + "import": "./dist/pixi-gif.esm.mjs", + "require": "./dist/pixi-gif.cjs.js", + "types": "./index.d.ts" } }, "scripts": { @@ -88,7 +86,8 @@ "engines", "pre-commit", "devDependencies", - "eslintConfig" + "eslintConfig", + "source" ] }, "devDependencies": {