5
我是Mean.io的新手,我試圖將外部.js文件聚合到我的包中,但是我做錯了,因爲它沒有被添加到聚合中.js文件。如何在Mean.io上聚合JS資產
這是我做了什麼:
importer.register(function(app, auth, database) {
importer.aggregateAsset('js', 'xml2json.min.js');
//We enable routing. By default the Package Object is passed to the routes
importer.routes(app, auth, database);
//We are adding a link to the main menu for all admin users
VavelImporter.menus.add({
title: 'importer example page',
link: 'importer example page',
roles: ['admin'],
menu: 'main'
});
return importer;
});
的重要路線是:importer.aggregateAsset( 'JS', 'xml2json.min.js');我的資產(xml2json.min.js)位於importer/public/assets/js/xml2json.min.js之下。
我需要有人向我解釋在哪裏放置該資產,以便Mean.io找到該文件。
謝謝。