-
Notifications
You must be signed in to change notification settings - Fork 327
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
Migrate from Webpack to Vite #879
Closed
hyperupcall
wants to merge
34
commits into
OpenEnergyDashboard:development
from
fox-forks:improve-build
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
1abf1d6
fix: Default-import Moment to make Vite happy
hyperupcall 05c7673
fix: Export Redux store from a separate file
hyperupcall fd64495
fix: Use static plotly.js imports to make Vite happy
hyperupcall 86c1ad1
feat: Remove Webpack and add Vite
hyperupcall f9d328c
chore: Add YAML to `.editorconfig`
hyperupcall e35768e
chore: Convert to tabs in `package{,-lock}.json` and config
hyperupcall a4e0244
chore: Format files
hyperupcall a9226d5
chore: Add previous formatting commit to new file `.git-blame-ignore-…
hyperupcall b16d091
chore: Update dependencies
hyperupcall 1343091
fix: Miscellaneous fixes
hyperupcall 5ce9935
fix: `peerDependency` resolutions
hyperupcall 758d915
fix: Remove `core-js@2`
hyperupcall 72efd58
fix: Make `TimeInterval.mjs` work
hyperupcall cde54ed
Various fixes and updates
hyperupcall f1f1457
fix: Expected a class/function as component Error
hyperupcall 6a16512
fix: Import lodash with default imported
hyperupcall d0375a3
fix: Manually chunk dependencies for improved load times
hyperupcall 547113e
chore: Update to Vite 4.3
hyperupcall 413d58e
chore: Add missing license headers
hyperupcall 78ed31e
Fix TypeScript error from `@formatjs/ecma402-abstract`
hyperupcall 9455185
fix: Convert `TimeInterval.js` back to CommonJS
hyperupcall eb0f709
fix: Vite now listens on port `9229` in container
hyperupcall e38e99b
Merge branch 'development' into improve-build
hyperupcall 3340c9b
fix: Remove vestiges
hyperupcall a4816a1
fix: Override transitive dependency resolutions
hyperupcall 984ebd1
Fix typecheck and remove unused HTML file
hyperupcall 6476534
fix: Do not race on `npm ci` in `docker-compose`
hyperupcall 4773564
chore: Fix editorconfig
hyperupcall db186a3
Remove more Webpack things
hyperupcall 347b1a4
Comment tweaks
hyperupcall 8164663
Merge branch 'development' into improve-build
hyperupcall ef241f6
Set default for Vite dev server to `8085`
hyperupcall 37e5aa6
style(webpack): Format code
hyperupcall 32e497f
Merge branch 'development' into improve-build
hyperupcall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
const database = require('./database'); | ||
const { TimeInterval } = require('../../common/TimeInterval'); | ||
const { TimeInterval } = import('../../common/TimeInterval.mjs'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To elaborate a bit more from the extended commit message: Because |
||
const sqlFile = database.sqlFile; | ||
class Baseline { | ||
constructor(meterID, applyStart, applyEnd, calcStart, calcEnd, note = null, baselineValue = null) { | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably note that this commit doesn't fix anything server-side. NodeJS only allows importing ESM through dynamic imports. But, I didn't properly await the imports, so there were errors since the imports had a value of
Promise<Module>
rather thanModule
. I didn't see the errors until later.I later fixed this in 9455185 (one of the last commits in this series) by converting things back to CommonJS. Luckily, I didn't get the previous errors I was getting with Vite because I updated Vite to a later version by then.