小编Alq*_*diq的帖子

我想在 create-react-app 中添加一个 babel 插件

我想在react-scripts我不想从 cra 弹出我想继续使用它而不弹出的情况下添加以下 babel 配置。我看到有一种方法可以分叉 repo 并添加您的自定义配置。但我想知道我可以在哪里粘贴这个。

// .babelrc or babel-loader option
{
  "plugins": [
    ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }] // `style: true` for less
  ]
}
Run Code Online (Sandbox Code Playgroud)

reactjs babeljs create-react-app

7
推荐指数
1
解决办法
9775
查看次数

如何从webpack 中的assets url 中删除后缀斜杠“/” | 盖茨比

I am generating a build from webpack. But whenever it generates a build it creates an index.html file along with other files but in the index.html it adds script tags with the suffix "/". I want to add a configuration in webpack to just add the name of the files of different assets instead of the suffix "/"

My index.html:

<head>
  <meta charSet="utf-8" />
  <meta http-equiv="x-ua-compatible" content="ie=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <meta name="generator" content="Gatsby 2.1.19" />
  <link …
Run Code Online (Sandbox Code Playgroud)

html javascript reactjs webpack gatsby

5
推荐指数
1
解决办法
1234
查看次数

标签 统计

reactjs ×2

babeljs ×1

create-react-app ×1

gatsby ×1

html ×1

javascript ×1

webpack ×1