Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update get-started.md | Removes deprecation warning for webpackconfig in favor of generateWebpackConfig #1337

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

Merged
justin808 merged 1 commit into reactjs:master from chmod600:patch-1
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/get-started.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,16 @@ Then modify the webpack config to use it as a plugin:

```js
// config/webpack/webpack.config.js
const { webpackConfig, merge } = require("shakapacker");
const ForkTSCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const { generateWebpackConfig, merge } = require('shakapacker')
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = merge(webpackConfig, {
plugins: [new ForkTSCheckerWebpackPlugin()],
});
const webpackConfig = generateWebpackConfig()

module.exports = merge(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not blocking, but fwiw this can be simplified further as generateWebpackConfig now takes a config to be merged in:

module.exports = generateWebpackConfig({
 plugins: [new ForkTsCheckerWebpackPlugin()]
});

webpackConfig, {
plugins: [new ForkTsCheckerWebpackPlugin()]
}
);
```

Doing this will allow React-Rails to support the .tsx extension. Additionally, it is recommended to add `ts` and `tsx` to the `server_renderer_extensions` in your application configuration:
Expand Down

AltStyle によって変換されたページ (->オリジナル) /