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

Build error building against matrix-js-sdk 23.2.0 (type loader issues webpack) #3135

Closed
0xM4m4n opened this issue Feb 7, 2023 · 4 comments · Fixed by #3149
Closed

Build error building against matrix-js-sdk 23.2.0 (type loader issues webpack) #3135

0xM4m4n opened this issue Feb 7, 2023 · 4 comments · Fixed by #3149
Assignees

Comments

@0xM4m4n
Copy link

0xM4m4n commented Feb 7, 2023

Hey team it seems I am running into a loader issue for the latest matrix release when building my applicaiton
image

I believe it is related to this change but not sure what loader Ill need in my webpack config to compile the sdk properly.

here's a piece from webpack:

plugins: [
      new TsconfigPathsPlugin({
        baseUrl: __dirname,
        configFile: "./tsconfig.json",
        extensions: [".js", ".ts", ".tsx"],
      }),
    ]
  },
  node: {
    global: true,
  },
  module: {
    rules: [
      {
        test: /\.(js|mjs|jsx|ts|tsx)$/,
        exclude: /(node_modules|bower_components)/,
        use: [{
            loader: "babel-loader",
            options: {
              presets: [
                '@babel/preset-env',
                '@babel/preset-react',
                "@babel/preset-typescript",
              ],
            },

          },
        "ts-loader"]
      },
      {
        enforce: 'pre',
        test: /\.js$/,
        loader: 'source-map-loader'
      },
      {
        test: /\.html$/,
        use: ['html-loader'],
      },
      {
        test: /\.(png|jpe?g|gif|otf|ttf|woff|woff2|ogg)$/,
        type: 'asset/resource',
      },
      {
        test: /\.svg$/,
        type: 'asset/inline',
      },
      {
        test: /\.m?js/,
        resolve: {
          fullySpecified: false
        }
      }
    ],
  },

Any ideas would be appreciated! I am looking to move to vite soon but for now just trying to incorporate some of these latest changes which I think will help with stability

@andybalaam
Copy link
Contributor

andybalaam commented Feb 14, 2023

Should be fixed by #3150 (which is backported into matrix-js-sdk v23.3.0 , being released today)

@andybalaam
Copy link
Contributor

We think this is fixed - please let us know if you continue to see problems.

@andybalaam andybalaam changed the title Updating to latest matrix-js-sdk 23.2.0 type loader issues webpack Build error building against matrix-js-sdk 23.2.0 (type loader issues webpack) Feb 17, 2023
@andybalaam
Copy link
Contributor

andybalaam commented Feb 17, 2023

Also, I updated the description - please correct me if I'm wrong :-)

@0xM4m4n
Copy link
Author

0xM4m4n commented Mar 30, 2023

Thank you very much!

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

Successfully merging a pull request may close this issue.

2 participants