In my grunt.js
file I've got
requirejs: {
dist: {
options: {
almond: true,
wrap: true,
modules: [{name: 'main'}],
mainConfigFile: "src/js/main.js",
baseUrl: "src/js",
dir: "tmp/js",
inlineText: true,
preserveLicenseComments: false
}
}
}
Running grunt requirejs:dist
populates the tmp/js
directory with some minified files - among others a big main.js file (everything seems to be bundled in this file as expected) - however when I want to include this file like so
<script type="text/javascript" src="tmp/main.js"></script>
It results in an "Uncaught ReferenceError: define is not defined"
The intention behind using almond was that I don't need to load a require.js
file to load my opimized file - any idea how to get this to work?
footnote: I've already managed to do it this way, except that previously a main-built.js
file has been compiled, however this doesn't seem to be the case anymore (updates... -.-)