Execute npm run eject
and rename index.php to index.html, but it does not work. I need to include a class inside index.php to use a function that converts data encrypt to send toward React.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I found a solution,
First, execute:
npm run eject
then, change the code in paths.js to:
appHtml: resolveApp('public/index.php')
and webpack.config.dev.js (agree |php):
exclude: [/\.(js|jsx|mjs|php)$/, /\.html$/, /\.json$/]
after:
npm start
this works well