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 02a5b72

Browse files
Update get-started.md
Using webpackconfig throws a deprecation warning and encourages user to use generateWebpackConfig() instead.
1 parent 6b65463 commit 02a5b72

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 によって変換されたページ (->オリジナル) /