私はwebpack、angularjsを使用してプロジェクトを行っています。webpack.config.js では、以下を使用することがあるのを見てきました。
app.js内
require('angular')
webpack.config.js内
new webpack.DefinePlugin({
'require.specified': 'require.resolve'
}
webpack.config.js内
new webpack.ProvidePlugin({
Promise: 'bluebird'
}
webpack.config.js内
{
test: require.resolve('rxjs/bundles/Rx'),
use:[
{
loader: 'expose-loader',
options: 'Rx'
}
]
}
私はそれらの違いが何であるかを理解していません。require, require.resolve,webpack.DefinePluginをいつ使うべきかwebpack.ProvidePlugin
誰でも私を助けてくれますか?
ありがとうございました