-
Notifications
You must be signed in to change notification settings - Fork 137
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
Align webpack's outputPath with the whole app #1194
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
---|---|---|
|
@@ -11,13 +11,41 @@ export interface BabelLoaderOptions { | |
} | ||
|
||
export interface Options { | ||
// This allows you to extend the webpack config in arbitrary ways. Your | ||
// changes will get applied on top of the defaults provided by | ||
// @embroider/webpack. | ||
webpackConfig: Configuration; | ||
|
||
// the base public URL for your assets in production. Use this when you want | ||
// to serve all your assets from a different origin (like a CDN) than your | ||
// actual index.html will be served on. | ||
// | ||
// This should be a URL ending in "/". | ||
// | ||
// For example: | ||
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. thanks for adding additional docs + examples! |
||
// | ||
// 1. If your build produces the file "./dist/assets/chunk.123.js" | ||
// 2. And you set publicAssetURL to "https://cdn/" | ||
// 3. Browsers will try to locate the file at | ||
// "https://cdn/assets/chunk.123.js". | ||
// | ||
// Notice that `publicAssetURL` gets applied relative to your whole built | ||
// application -- not a particular subdirectory like "/assets". If you don't | ||
// want a part of the path to show up in the public URLs, you should adjust the | ||
// actual locations of the output files to remove that directory. For example: | ||
// | ||
// webpackConfig: { | ||
// output: { | ||
// // This overrides our default of "assets/chunk.[chunkhash].js" | ||
// // to move the chunks to the root of the app, eliminating the assets subdirectory. | ||
// filename: `mychunk.[chunkhash].js`, | ||
// chunkFilename: `mychunk.[chunkhash].js`, | ||
// }, | ||
// publicOutputPath: "https://cdn/", | ||
// }, | ||
// | ||
// The above example will result in CDN URLs like "https://cdn/mychunk.123.js". | ||
// | ||
publicAssetURL?: string; | ||
|
||
// [thread-loader](https://github.com/webpack-contrib/thread-loader) options. | ||
|
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.
do we have existing tests to assert these files are created in this folder?
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.
Tests likethese are directly inspecting the output files.
And the various tests/scenarios are ensuring that these files actually execute.