【发布时间】:2019-05-31 23:16:16
【问题描述】:
当我尝试连接时:
mix.ts('resources/assets/js/app.ts', 'public/js/app.js')
.react('resources/js/app.ts', 'public/js/app.js');
出现错误:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry should be one of these:
function | object { <key>: non-empty string | [non-empty string] } | non-empty string | [non-empty string]
-> The entry point(s) of the compilation.
所以,我是这样解决的:
`mix.react('resources/js/index.js', 'public/js/app.js')
.webpackConfig({
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.ts', '.tsx'],
},
})`
但我不确定它是否正确,有什么建议吗???我会很高兴,谢谢)
【问题讨论】:
标签: javascript reactjs webpack laravel-mix