Skip to content

Commit

Permalink
Fix order of extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ddalpange committed Jun 29, 2022
1 parent 287ac96 commit 2625f6a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ const newWebpackConfiguration = (
rules: [{ keepBaseRule: true } as any],
},
resolve: {
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'],
modules: ['node_modules'],
mainFields: ['browser', 'main'],
alias: {
Expand Down
2 changes: 1 addition & 1 deletion lib/builder-webpack4/src/preview/iframe-webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export default async (options: Options & Record<string, any>): Promise<Configura
],
},
resolve: {
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: [modern ? 'sbmodern' : null, 'browser', 'module', 'main'].filter(Boolean),
alias: {
Expand Down
2 changes: 1 addition & 1 deletion lib/builder-webpack5/src/preview/iframe-webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default async (options: Options & Record<string, any>): Promise<Configura
],
},
resolve: {
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'],
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: [modern ? 'sbmodern' : null, 'browser', 'module', 'main'].filter(Boolean),
alias: {
Expand Down
2 changes: 1 addition & 1 deletion lib/manager-webpack4/src/presets/manager-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export async function managerWebpack(
],
},
resolve: {
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.json', '.cjs', '.ts', '.tsx'],
extensions: ['.mjs', '.js', '.jsx', '.json', '.cjs', '.ts', '.tsx'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: [modern ? 'sbmodern' : null, 'browser', 'module', 'main'].filter(Boolean),
alias: {
Expand Down
2 changes: 1 addition & 1 deletion lib/manager-webpack5/src/presets/manager-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export async function managerWebpack(
],
},
resolve: {
extensions: ['.cjs', '.mjs', '.js', '.jsx', '.json', '.cjs', '.ts', '.tsx'],
extensions: ['.mjs', '.js', '.jsx', '.json', '.cjs', '.ts', '.tsx'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: [modern ? 'sbmodern' : null, 'browser', 'module', 'main'].filter(Boolean),
alias: {
Expand Down

0 comments on commit 2625f6a

Please sign in to comment.