requirejs / almond

A minimal AMD API implementation for use after optimized builds
Other
2.42k stars 169 forks source link

Almong not run deps for require.config #93

Closed MikeBazhenov closed 9 years ago

MikeBazhenov commented 9 years ago

Hi!

When i build app, app not run module boot declared in require.config

.pipe(rjs({
            mainConfigFile: './public/js/requirejs.config.js',
            name: '../vendors/almond/almond',
            baseUrl: './public/js',
            out: 'out.js',
            removeCombined: true,
            findNestedDependencies: true
        }))

//requirejs.config.js

require.config({
    baseUrl: "/js",
    waitSeconds: 60,
    paths: {
        ...
    },
    urlArgs: "v=1.5",
    shim: {
        ...
    },
    deps: ["boot"]
});

//boot.js

define([
   ...
],
    function ($, angular) {
        'use strict';
        console.log('boot');
        $(document).ready(function () {
            angular.bootstrap(document, ['app']);
        });
    });
jrburke commented 9 years ago

The requirejs.config.js file needs to be included in the built output. This can be done by changing the 'name' config to point to requirejs.config, and then use the include build option to include almond.

Going to close as I believe that is the source of the issue.