我有:
$ ls -last /home/brandon/workspace/ced2ar/jsgen/target/scala-2.12/scalajs-bundler/main/node_modules/bootstrap/dist/js/bootstrap.min.js
40 -rw-r--r-- 1 brandon brandon 37045 Jul 25 2016 /home/brandon/workspace/ced2ar/jsgen/target/scala-2.12/scalajs-bundler/main/node_modules/bootstrap/dist/js/bootstrap.min.js
和
@JSImport("node_modules/bootstrap/dist/js/bootstrap.min.js", "jQuery")
然而,当我运行 bundler 时,我收到以下错误:
[error] ModuleNotFoundError: Module not found: Error: Can't resolve 'node_modules/bootstrap/dist/js/bootstrap.min.js' in '/home/brandon/workspace/ced2ar/jsgen/target/scala-2.12/scalajs-bundler/main'
[error] at factoryCallback (/home/brandon/workspace/ced2ar/jsgen/target/scala-2.12/scalajs-bundler/main/node_modules/webpack/lib/Compilation.js:269:40)
我也试过只使用文件bootstrap.min.js
名@JSImport
。(注意:我认为一旦我解决了这个问题,我仍然会遇到处理猴子补丁的问题,因为这似乎是引导程序对 JQuery 所做的事情。)