Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESM module & TS typings #129

Closed
bigtimebuddy opened this issue May 9, 2019 · 1 comment · Fixed by #130
Closed

ESM module & TS typings #129

bigtimebuddy opened this issue May 9, 2019 · 1 comment · Fixed by #130

Comments

@bigtimebuddy
Copy link
Contributor

Because resource-loader does not export an ES module build, it requires users that use Rollup + pixi.js to define named exports. For instance:

./rollup.config.js

import commonjs from 'rollup-plugins-commonjs';
export default {
  //...
  plugins: [ 
    commonjs({
      namedExports: { "resource-loader": [ "Resource" ] }
    })
  ]
}

It is creating a minor gotcha for users of Rollup and could be alleviated if an ES bundle was created and defined in the package.json module field.

In addition, TypeScript typings would also help improve developer experience.

@englercj
Copy link
Owner

englercj commented May 9, 2019

TypeScript typings are generated here: https://github.com/englercj/resource-loader/tree/master/typings

I'm happy to make any changes that make things easier, but I'm not 100% sure what needs to change. Open to any PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants