forked from google/neuroglancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The main advantage of vite is that the dev-server avoids bundling, but this leads to a lot of inconsistency between the dev-server and bundled version. In particular, there did not seem to be any non-hacky way to override the path of the oauth redirect html pages when using the dev-server. Additionally, in practice the webpack dev-server is just as fast once the time spent by the browser loading the non-bundled sources is taken into account.
- Loading branch information
Showing
31 changed files
with
44,223 additions
and
6,866 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,4 @@ jobs: | |
with: | ||
name: client | ||
path: | | ||
dist/min/* | ||
dist/client/* |
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 was deleted.
Oops, something went wrong.
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,13 @@ | ||
// Converts a webpack configuration that optionally contains an extra `define` | ||
// property into a regular webpack configuration with an added `DefinePlugin`. | ||
|
||
import webpack from "webpack"; | ||
|
||
export function normalizeConfigurationWithDefine(config) { | ||
let { define, plugins, ...rest } = config; | ||
if (define !== undefined && Object.keys(define).length > 0) { | ||
plugins ??= []; | ||
plugins.push(new webpack.DefinePlugin(define)); | ||
} | ||
return { plugins, ...rest }; | ||
} |
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,14 @@ | ||
// This module is specified as the webpack config module when `cli.ts` invokes | ||
// `webpack-cli` programmatically. | ||
// | ||
// It simply returns the configuration previously set by `cli.ts`. | ||
// | ||
// This module is in cjs format rather than esm format to avoid a separate copy | ||
// being loaded, for some reason, by tsx. | ||
|
||
let config = undefined; | ||
|
||
module.exports = (...args) => config(...args); | ||
module.exports.setConfig = (newConfig) => { | ||
config = newConfig; | ||
}; |
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
Oops, something went wrong.