-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide development build for bundlers, warn on unadded entity (#…
…3032) This adds a "development" build of Excalibur that [bundlers can use](https://webpack.js.org/guides/package-exports/#providing-devtools-or-production-optimizations). It allows us to include code that can be used to help the user during development but still keep it out of production builds as to not affect performance / size. This requires removing the `module` field in package.json in favour of `exports`, which is OK (`exports` essentially supersedes `module`). **There is potential for breaking change** here, as any nested imports e.g. `'excalibur/dist/abc'` would now need to be added to this exports map. But I don't believe there was ever a reason to do that, since everything is exported from the excalibur.js file. (Types are not affected) I've tested this in a Vite project and it works, haven't tested it with Webpack yet. ## Changes: - create development builds of excalibur that bundlers can use in dev mode - show warning in development when Entity hasn't been added to a scene after a few seconds
- Loading branch information
1 parent
c39cfa0
commit e0dc8fd
Showing
8 changed files
with
74 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
declare global { | ||
namespace NodeJS { | ||
interface ProcessEnv { | ||
__EX_VERSION: string; | ||
NODE_ENV: string; | ||
} | ||
} | ||
} | ||
|
||
// satisfy TypeScript | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters