Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1910 from watsonhaw5566/fix_toutiao
Browse files Browse the repository at this point in the history
fix: 头条配置文件复制到dist目录
  • Loading branch information
Evans committed May 19, 2022
2 parents 5c1205c + 0abdfa6 commit 5636b85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/remax-cli/src/build/webpack/config.mini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ export default function webpackConfig(builder: Builder): webpack.Configuration {
.plugin('webpack-copy-plugin')
.use(CopyPlugin, [[{ from: builder.projectPath.publicDir(), to: builder.projectPath.outputDir() }]]);
}
// 判断是否是头条小程序,如果是的话将project.config.json复制到dist目录下
// 否则头条开发者工具无法识别Remax头条小程序
const miniProjectConfigJsonFile = `${builder.projectPath.projectDir()}/project.config.json`;
// 判断是否是头条小程序,如果是的话将 project.tt.json 复制到 dist 目录下
// 否则头条开发者工具无法识别 Remax 头条小程序
const miniProjectConfigJsonFile = `${builder.projectPath.projectDir()}/project.tt.json`;
if (builder.options.target == 'toutiao' && fs.existsSync(miniProjectConfigJsonFile)) {
config.plugin('webpack-copy-plugin').use(CopyPlugin, [
[
{
from: miniProjectConfigJsonFile,
to: builder.projectPath.outputDir(),
to: `${builder.projectPath.outputDir()}/project.config.json`,
},
],
]);
Expand Down

0 comments on commit 5636b85

Please sign in to comment.