Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with webpack #109

Open
AlbaSS18 opened this issue Jun 21, 2022 · 0 comments
Open

Error with webpack #109

AlbaSS18 opened this issue Jun 21, 2022 · 0 comments

Comments

@AlbaSS18
Copy link

AlbaSS18 commented Jun 21, 2022

Hi,

I have added this library in my project where I worked with Angular. In local, everything works fine and the tests passed. However, when I run the tests in jenkins, it is displaying the next error:

imagen

I have configured how the readme.md said, so I don't understand why it is displaying this error.

In command.js, I have added:
imagen

In package.json:
imagen

My tsconfig.json:

imagen

I have tried to add an alias in my webpack.config.prod.js, but it is still failing.

module.exports = env => ({
  entry: path.resolve(__dirname, "src/root-config"),
  output: {
    filename: "root-config.js",
    libraryTarget: "system",
    path: path.resolve(__dirname, "dist")
  },
  devtool: "sourcemap",
  module: {
    rules: [
      { parser: { system: false } },
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: [{ loader: "babel-loader" }]
      }
    ]
  },
  resolve: {
    alias: {
      "@4tw": path.resolve(__dirname, "src")
    }
  },
  plugins: [
    new CopyWebpackPlugin([
      { from: path.resolve(__dirname, "src/favicon.ico"), to: "favicon.ico" },
      { from: path.resolve(__dirname, "img"), to: "img" },
      {
        from: path.resolve(__dirname, "src/importmap.json"),
        to: "importmap.json"
      },
      {
        from: path.resolve(__dirname, "node_modules/primeicons"),
        to: "primeicons"
      }
    ]),
    new HtmlWebpackPlugin({
      inject: false,
      template: "src/index.ejs",
      templateParameters: {
        isLocal: env && env.isLocal
      }
    }),
    new CleanWebpackPlugin()
  ],
  externals: ["single-spa", /^@monitor\/.+$/, "i18next"]
});

Can anyone help me, please?

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant