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

Commit 151d333

Browse files
Merge pull request #1337 from chmod600/patch-1
Update get-started.md | Removes deprecation warning for webpackconfig in favor of generateWebpackConfig
2 parents 543b0e3 + 02a5b72 commit 151d333

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

‎docs/get-started.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,16 @@ Then modify the webpack config to use it as a plugin:
194194

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

200-
module.exports = merge(webpackConfig, {
201-
plugins: [new ForkTSCheckerWebpackPlugin()],
202-
});
200+
const webpackConfig = generateWebpackConfig()
201+
202+
module.exports = merge(
203+
webpackConfig, {
204+
plugins: [new ForkTsCheckerWebpackPlugin()]
205+
}
206+
);
203207
```
204208

205209
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:

0 commit comments

Comments
(0)

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