haul icon indicating copy to clipboard operation
haul copied to clipboard

Error hermesEnabled on Android

Open isuhar opened this issue 4 years ago • 3 comments

Sorry, can`t reopen old issue https://github.com/callstack/haul/issues/714

Environment

"@haul-bundler/babel-preset-react-native": "0.16.0", "@haul-bundler/cli": "0.18.0", "@haul-bundler/core": "0.18.0", "@haul-bundler/preset-0.60": "0.18.0", "react-native": "0.61.5",

Description

When turn on hermes on android, bundle dont work. Hermes enabled, but it only helps to remove line from defaultConfig in preset-0.60

exclude: /node_modules(?!.*[\/\\](react|@react-navigation|@react-native-community|@expo|pretty-format|@haul-bundler|metro))/,

Haul config:

export default makeConfig({
    bundles: {
        index: {
            entry: withPolyfills("./src/mobile/index"),
        },
    },
})

babel config:

module.exports = function(api) {
    api.cache.using(() => process.env.BABEL_ENV)

    return {
        presets: [
           ["module:@haul-bundler/babel-preset-react-native", {hermes: true}],
        ],
    }
}

Reproducible Demo

image

isuhar avatar Mar 30 '20 16:03 isuhar

Just to confirm, withe Hermes enabled the only way to make the bundle work is to remove the exclude from Webpack config. Am I correct?

zamotany avatar Mar 30 '20 16:03 zamotany

Yes)

isuhar avatar Mar 30 '20 16:03 isuhar

Facing the same issue, is there any planned fix? Any workaround? @isuhar Did you find any solution?

eng-ms avatar Oct 23 '20 10:10 eng-ms