-
-
Couldn't load subscription status.
- Fork 638
Fix bundle path resolution and improve server bundle security #1798
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
Changes from all commits
4ee772e
9e1465a
7aff6da
b0c4963
61a1254
d974d82
60b50d8
6a2035f
afd06ed
ed37a2b
fa07c57
55a30c0
8936a77
88212b8
d917bda
b478d61
3cb7cdc
60d498d
3d5c7ea
4252368
6c38c6f
a9aff90
92b58ea
ffa58ac
369f5a7
b36413d
a0e9656
1c9e45e
57a3ab9
eb7ed67
fcddead
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,13 +44,14 @@ const configureServer = () => { | |
|
|
||
| // Custom output for the server-bundle that matches the config in | ||
| // config/initializers/react_on_rails.rb | ||
| // Server bundles are output to a private directory (not public) for security | ||
| serverWebpackConfig.output = { | ||
| filename: 'server-bundle.js', | ||
| globalObject: 'this', | ||
| // If using the React on Rails Pro node server renderer, uncomment the next line | ||
| // libraryTarget: 'commonjs2', | ||
| path: config.outputPath, | ||
| publicPath: config.publicPath, | ||
| path: require('path').resolve(__dirname, '../../ssr-generated'), | ||
|
||
| // No publicPath needed since server bundles are not served via web | ||
| // https://webpack.js.org/configuration/output/#outputglobalobject | ||
| }; | ||
|
|
||
|
|
||
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.
The logic adds a leading newline but also a trailing newline, which could result in extra blank lines in .gitignore. The leading newline in the comment line and the trailing newline in the join result could create formatting inconsistencies.