Skip to content

Commit

Permalink
add module mainField
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Mar 18, 2021
1 parent 5a90169 commit effd002
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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 @@ -194,7 +194,7 @@ export default async ({
resolve: {
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: isProd ? undefined : ['browser', 'main'],
mainFields: ['browser', 'module', 'main'],
alias: {
...themingPaths,
...storybookPaths,
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 @@ -195,7 +195,7 @@ export default async ({
resolve: {
extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: ['browser', 'main'],
mainFields: ['browser', 'module', 'main'],
alias: {
...themingPaths,
...storybookPaths,
Expand Down
2 changes: 1 addition & 1 deletion lib/core-server/src/manager/manager-webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default async ({
resolve: {
extensions: ['.mjs', '.js', '.jsx', '.json', '.cjs', '.ts', '.tsx'],
modules: ['node_modules'].concat(envs.NODE_PATH || []),
mainFields: ['module', 'main'],
mainFields: ['browser', 'module', 'main'],
alias: {
...themingPaths,
...uiPaths,
Expand Down

0 comments on commit effd002

Please sign in to comment.