Webpack 如何禁用预加载程序?
我已经设置好了,但是我想以javascript的形式加载一个特定的文件,而不需要对其进行linting。我的jshint被设置为预加载程序 我已尝试禁用此预加载程序,如下所示:Webpack 如何禁用预加载程序?,webpack,Webpack,我已经设置好了,但是我想以javascript的形式加载一个特定的文件,而不需要对其进行linting。我的jshint被设置为预加载程序 我已尝试禁用此预加载程序,如下所示: require('!script!。/../lib/bootstrap') 因为声明: 添加!发送请求将禁用已配置的预加载程序 需要(“!raw!。/script.coffee”) 但是,当我执行此操作时,文件仍然被挂起: ./~/script loader/~/raw loader!中出现警告/~/jshint加载器/
require('!script!。/../lib/bootstrap')代码>
因为声明:
添加!发送请求将禁用已配置的预加载程序
需要(“!raw!。/script.coffee”)
但是,当我执行此操作时,文件仍然被挂起:
./~/script loader/~/raw loader!中出现警告/~/jshint加载器/lib/bootstrap.js
jshint会导致错误
如果我使用此选项,则需要:
require('!!script!。/../lib/bootstrap')代码>
不发生起毛
这里发生了什么?为什么我不能使用建议的禁用预加载程序的方法禁用此预加载程序
module: {
preLoaders: [
{
test: /\.js$/, // include .js files
exclude: /node_modules/, // exclude any and all files in the node_modules folder
loader: "jshint-loader"
}
]
},