stoneheart Posted May 23, 2019 Share Posted May 23, 2019 Getting error while using rollup with pixijs. rollup.config.js default export { input: 'js/game.js', output: { format: 'amd', file: 'dist/game.js' } } //game.js let PIXI = require('pixi.js'); PIXI.utils.sayHello(); Getting define not found error in console. Quote Link to comment Share on other sites More sharing options...
llpujol Posted May 23, 2019 Share Posted May 23, 2019 If you use AMD in order to reference your modules, you should configure your rollup config in order to let it know you do this way. Here in this github issue is discussed a little bit, there are some solutions to this problems that I am sure will help you. Although, If you can, I would recommend you to stop using require and use ES6 modules (import/export) that is an accepted standard. PD: If you are developing on browser environment, checkout this quickstart-pixijs project, it can maybe help you too! It uses Parcel under the hood. Also, if you want to make some kind of library (as it seems in your example) is pretty easy to configure, just let me know! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.