我想知道如何在Laravel和webpack中使用传单插件。
目前,我有:
webpack.mix.js:
mix.js([
'resources/assets/js/app.js',
'resources/assets/js/main.js',
], 'public/js/app.js');
app.js:
require('./bootstrap');
bootstrap.js:
window._ = require('lodash');
try {
window.$ = window.jQuery = require('jquery');
window.Popper = require('popper.js').default; // default is very important.
require('bootstrap');
} catch (e) {}
main.js:
let leaflet = require('./leaflet.js');
let GroupLayer = require('./grouplayer-leaflet.js');
let antPath = require('./leaflet-ant-path.js');
$(window).on('load', function() {
... my code
在./resources/assets/js/中,我有不同的文件
但是我有一个错误:
找不到./resources/assets/js/leaflet-ant-path.js模块中的错误: 错误:无法解析“传单”