Receiving warning after upgrade to latest xterm version.
I used NPM to install xterm and webpack to build the client app.
This is expected since we compile and commit the assets to dist/. We do this so we can distribute with bower and also with npm without needing to install babel. It's probably best to just ignore the warning as then you may not be able to upgrade if we change our build system (like we're doing in v2.2.0).
@veeramarni as @Tyriar said the best thing you can do is ignore this warning.
Another alternative would be requiring xterm.js as a relative dependency in your webpack bundle and use the node_modules/xterm/src/xterm.js path.
I don't think that this will work out of the box though, since we migrated to building with TypeScript.
Closing this as there are not much that we can do to suppress this warning from our side.
In our projects, we have a src/ folder that has ES6 TypeScript. We output to a lib/ directory that is ES5, and our main in package.json points to the index in that directory. We ship the lib/ directory on npm, but keep only src/ in version control. We also ship a separate dist/ directory that could be used for bower. The package.json should point to node code, and bower.json to the dist code.
In this way, consumers require xterm in a way that works best for their use case, without needing extra config or importing from node_modules.
@blink1073 dist/ will contain un-minified ES5, from 2.2.0 we now build with TypeScript which you obviously can't use in your build process. Unless I'm misunderstanding, I believe pointing main at dist/xterm.js is ideal for your use case.
Great, all I was looking for was for main in package.json to point to ES5 commonjs code, and pointing out how we do it ourselves.
As a workaround, I'm using noParse to prevent the warnings.
"noParse": ["node_modules/localforage/dist/localforage.js", "node_modules/xterm/dist/xterm.js"]
This should not be the case starting with 2.3.0, due to #398.
Most helpful comment
As a workaround, I'm using noParse to prevent the warnings.
"noParse": ["node_modules/localforage/dist/localforage.js", "node_modules/xterm/dist/xterm.js"]