I created one module and i want to add js file to that module but in DOM i am getting "404 not found" my file are
My\Helloworld\view\frontend\requirejs-config.js
var config = {
map: {
'*': {
test1: 'My_Helloworld/js/test1'
}
},
};
My\Helloworld\view\frontend\web\js\test1.js
define([
"jquery"
], function($) {
"use strict";
$(document).ready(function(){
alert('Test JS');
});
});
My\Helloworld\view\frontend\templates\helloworld.phtml
<script type="text/javascript">
require(['jquery','test1'],function($){
$(window).load(function() {
$('.flexslider-8').flexslider({
animation: "fade",
controlNav: "thumbnails",
slideshowSpeed: 2000,
minItems: 2,
maxItems: 4
});
});
});
</script>