Skip to content

Commit

Permalink
feat(fast-refresh): Enables fast refresh by default in dev mode (redw…
Browse files Browse the repository at this point in the history
…oodjs#2085)

Co-authored-by: David Price <[email protected]>
  • Loading branch information
dac09 and thedavidprice authored Mar 25, 2021
1 parent a764fd0 commit ad4a8cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const getStyleLoaders = (isEnvProduction) => {
// Shared with storybook, as well as the RW app
const getSharedPlugins = (isEnvProduction) => {
const shouldIncludeFastRefresh =
redwoodConfig.web.experimentalFastRefresh && !isEnvProduction
redwoodConfig.web.fastRefresh !== false && !isEnvProduction

return [
isEnvProduction &&
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/src/__tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('getConfig', () => {
"a11y": true,
"apiProxyPath": "/.netlify/functions",
"apiProxyPort": 8911,
"experimentalFastRefresh": false,
"fastRefresh": true,
"host": "localhost",
"path": "./web",
"port": 8910,
Expand Down
5 changes: 2 additions & 3 deletions packages/internal/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ interface BrowserTargetConfig {
// TODO: apiProxyHost: string
apiProxyPort: number
apiProxyPath: string
experimentalFastRefresh?: boolean
experiemntalPrerender?: boolean
fastRefresh: boolean
a11y: boolean
}

Expand All @@ -53,7 +52,7 @@ const DEFAULT_CONFIG: Config = {
target: TargetEnum.BROWSER,
apiProxyPath: '/.netlify/functions',
apiProxyPort: 8911,
experimentalFastRefresh: false,
fastRefresh: true,
a11y: true,
},
api: {
Expand Down

0 comments on commit ad4a8cc

Please sign in to comment.