-
Notifications
You must be signed in to change notification settings - Fork 365
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/remaxjs/remax/9mgj4n6b9 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9bfed21:
|
@@ -94,7 +94,7 @@ export default function webpackConfig(api: API, options: Options): webpack.Confi | |||
|
|||
config.plugin('html-webpack-plugin').use(HtmlWebpackPlugin, [ | |||
{ | |||
template: path.resolve(__dirname, '../../../template/index.html.ejs'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是直接通过 configWebpack
修改 html-webpack-plugin
就可以满足需求了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是直接通过
configWebpack
修改html-webpack-plugin
就可以满足需求了?
是的是的。自己接管就好了。
不过不能更改根节点的id(虽然感觉这是伪需求)。
Codecov Report
@@ Coverage Diff @@
## master #1115 +/- ##
==========================================
+ Coverage 95.27% 95.29% +0.02%
==========================================
Files 350 351 +1
Lines 3682 3698 +16
Branches 515 521 +6
==========================================
+ Hits 3508 3524 +16
Misses 172 172
Partials 2 2
Continue to review full report at Codecov.
|
@JesuisTong CRA 的 cli 跟脚手架是绑定的,所以可以这么做。我们不行的。 |
俺不太明白。。🤦♀️ |
就是对我们来说直接去读 |
哦哦,那感觉最好还是用参数控制来显式的声明一下template的path? |
那没必要,就现在这样挺好的。文档补一下就可以了。 |
🙆 |
我们现在如果 public 目录里有 index.html 就是会覆盖掉默认的 index.html 吧? |
a78b7b6
to
6c53418
Compare
@@ -91,10 +91,12 @@ export default function webpackConfig(api: API, options: Options): webpack.Confi | |||
.plugin('webpack-copy-plugin') | |||
.use(CopyPlugin, [[{ from: publicDirPath, to: path.join(options.cwd, options.output) }]]); | |||
} | |||
|
|||
console.log(path.join(publicDirPath, 'index.html'), options.cwd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(path.join(publicDirPath, 'index.html'), options.cwd); |
docs/guide/basic/public.md
Outdated
|
||
<!-- TODO: 这个写什么版本? --> | ||
|
||
> 2.6.0 开始支持 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<!-- TODO: 这个写什么版本? --> | |
> 2.6.0 开始支持 | |
> 2.7.0 开始支持 | |
No description provided.