webpack.config.js 640 B

12345678910111213141516171819
  1. const createExpoWebpackConfigAsync = require('@expo/webpack-config');
  2. const path = require('path')
  3. module.exports = async function(env, argv) {
  4. const config = await createExpoWebpackConfigAsync(env, argv);
  5. config.module.rules.forEach(r => {
  6. if (r.oneOf) {
  7. r.oneOf.forEach(o => {
  8. if (o.use && o.use.loader && o.use.loader.includes('babel-loader')) {
  9. o.include = [
  10. path.resolve('.'),
  11. path.resolve('node_modules/@ui-kitten/components'),
  12. ]
  13. }
  14. })
  15. }
  16. })
  17. return config;
  18. };