(baseConfig, babelConfig, envVars)
| 182 | } |
| 183 | |
| 184 | async function createDevBrowserConfig(baseConfig, babelConfig, envVars) { |
| 185 | const browserConfig = createBaseBrowserConfig(baseConfig); |
| 186 | const babelRule = getBrowserBabelRule(babelConfig); |
| 187 | const { alchemyKey, walletConnectKey, neynarKey } = await getConfigs(); |
| 188 | return { |
| 189 | ...browserConfig, |
| 190 | mode: 'development', |
| 191 | plugins: [ |
| 192 | ...browserConfig.plugins, |
| 193 | new webpack.DefinePlugin({ |
| 194 | 'process.env': { |
| 195 | NODE_ENV: JSON.stringify('development'), |
| 196 | BROWSER: true, |
| 197 | COMM_ALCHEMY_KEY: JSON.stringify(alchemyKey), |
| 198 | COMM_WALLETCONNECT_KEY: JSON.stringify(walletConnectKey), |
| 199 | COMM_NEYNAR_KEY: JSON.stringify(neynarKey), |
| 200 | ...envVars, |
| 201 | }, |
| 202 | }), |
| 203 | new ReactRefreshWebpackPlugin(), |
| 204 | ], |
| 205 | module: { |
| 206 | rules: [ |
| 207 | { |
| 208 | ...babelRule, |
| 209 | options: { |
| 210 | ...babelRule.options, |
| 211 | plugins: [ |
| 212 | require.resolve('react-refresh/babel'), |
| 213 | ...babelRule.options.plugins, |
| 214 | ], |
| 215 | }, |
| 216 | }, |
| 217 | imageRule, |
| 218 | typographyRule, |
| 219 | { |
| 220 | test: /\.css$/, |
| 221 | exclude: /node_modules\/.*\.css$/, |
| 222 | use: [styleLoader, cssLoader], |
| 223 | }, |
| 224 | { |
| 225 | test: /node_modules\/.*\.css$/, |
| 226 | sideEffects: true, |
| 227 | use: [ |
| 228 | styleLoader, |
| 229 | { |
| 230 | ...cssLoader, |
| 231 | options: { |
| 232 | ...cssLoader.options, |
| 233 | modules: false, |
| 234 | }, |
| 235 | }, |
| 236 | ], |
| 237 | }, |
| 238 | ], |
| 239 | }, |
| 240 | devtool: 'eval-cheap-module-source-map', |
| 241 | }; |
no test coverage detected