diff --git a/lib/build.js b/lib/build.js index f49e5d91..f0b126f9 100644 --- a/lib/build.js +++ b/lib/build.js @@ -77,7 +77,8 @@ function webpackConfig(dir, {userWebpackConfig, useBabelrc} = {}) { var webpackConfig = { mode: webpackMode, resolve: { - extensions: ['.wasm', '.mjs', '.js', '.json', '.ts'] + extensions: ['.wasm', '.mjs', '.js', '.json', '.ts'], + mainFields: ['module', 'main'] }, module: { rules: [