question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@arcgis/webpack-plugin working with component library named antd report an error Can't resolve 'moment/main' in...

See original GitHub issue

Description

@arcgis/webpack-plugin working with component library named antd report an error Can’t resolve ‘moment/main’ in…

you can run my code https://github.com/dxiuxiu/arcgis-webpack-ArcGISPlugin to reappear this bug ,i try to remove webpack setting relatived to @arcgis/webpack-plugin this bug will disappear

webpack setting relatived to @arcgis/webpack-plugin

const ArcGISPlugin = require("@arcgis/webpack-plugin");
module.exports = {
  plugins: [
    new ArcGISPlugin({
      useDefaultAssetLoaders: false,
    }),
  ],
  externals: [
    (context, request, callback) => {
      if (/pe-wasm$/.test(request)) {
        return callback(null, "amd " + request);
      }
      callback();
    }
  ],
  node: {
    process: false,
    global: false
  }
}

or remove antd

but i just want to use @arcgis/webpack-plugin with antd ,how can i do ?

this is very important and emergency ,i want use they to develop my project 。

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
roemhildtgcommented, Mar 20, 2020

Appears to work for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I use antd in my component-library - Stack Overflow
I created a React component-libray using vite with simple components and it works as expected. I can publish it and link it to...
Read more >
Ant Design of React
Following the Ant Design specification, we developed a React UI library antd that contains a set of high quality components and demos for...
Read more >
Component-level CSS-in-JS - Ant Design
To solve this problem, each CSS-in-JS library will have its own way to deal with it. Let's take a look at Ant Design's...
Read more >
FAQ - Ant Design
Here are the frequently asked questions about Ant Design and antd that you should look up before you ask in the community or...
Read more >
V4 to V5 - Ant Design
This document will help you upgrade from antd 4.x version to antd 5.x version. If you are using 3.x or older version, please...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found