Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
How to include multiple paths in Webpack module rules? It keep giving error for another file

I am trying to include multiple paths into Webpack module rules. Initially it gave me error for ./src/bootstrap.js, So I included the same in rules, now it gives me error for ./src/App.js. When I try to include it in same way, it breaks badly and gives error for many other files.

Can some please tell me how can I include /node_modules/mfe-react/index.js and all files in src folder ?

module.exports = {
  module: {
    rules: [
      {
        test: /\.*?js$/,
        exclude: /node_modules/,
        include: ['/node_modules/mfe-react/index.js',
          path(__dirname, "..", "src", "bootstrap.js")
        ],
        use: {
          loader: "babel-loader",
          options: {
            presets: ["@babel/preset-react", "@babel/preset-env"],
            plugins: ["@babel/plugin-transform-runtime"],
          },
        },
      },
    ],
  },

Error: ERROR in ./src/App.js 13:12 Module parse failed: Unexpected token (13:12) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!