Skip to content

Commit

Permalink
feat(devtool): Ability to pass custom devtool option to config (#2063)
Browse files Browse the repository at this point in the history
* feat(devtool): Ability to pass custom devtool option to config

* default devtool to false
  • Loading branch information
adonispuente authored Sep 18, 2024
1 parent 32e4e29 commit 9734e19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/config/src/lib/createConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface CreateConfigOptions extends CommonConfigOptions {
resolve?: ResolveOptions;
stripAllPfStyles?: boolean;
blockLegacyChrome?: boolean;
devtool?: Configuration['devtool'];
}

export const createConfig = ({
Expand Down Expand Up @@ -96,6 +97,7 @@ export const createConfig = ({
nodeModulesDirectories = [],
stripAllPfStyles = false,
blockLegacyChrome,
devtool = false,
}: CreateConfigOptions): Configuration => {
if (typeof _unstableHotReload !== 'undefined') {
fecLogger(LogType.warn, `The _unstableHotReload option in shared webpack config is deprecated. Use hotReload config instead.`);
Expand All @@ -117,7 +119,7 @@ export const createConfig = ({
const devServerPort = typeof port === 'number' ? port : useProxy || standalone ? 1337 : 8002;
return {
mode: mode || (isProd ? 'production' : 'development'),
devtool: false,
devtool: devtool,
...(useCache
? {
cache: {
Expand Down

0 comments on commit 9734e19

Please sign in to comment.