G
G
Greg Popov2016-04-11 15:07:46
Yii
Greg Popov, 2016-04-11 15:07:46

What is the error when creating an asset bundle on Yii2 advaced?

Hello. At once I speak created a topic , but he died.
Again faced the same problem. Let me remind you the essence:
in the vendor / bower, I filled in the Foundation for the UI, but they don’t connect to the scripts of this foundation, I can’t find it, I searched through all the docks, I didn’t find a solution.
It's not basic, it's an advanced template, actually in basic everything works "with a bang"
frontend/assets/FoundationJsAsset.php

namespace frontend\assets;

use yii\web\AssetBundle;

/**
 * @author Greg Popov <greg.georg.popov@gmail.com>
 * @since 2.0
 */
class FoundationJsAsset extends AssetBundle
{
    public $sourcePath = '@vendor/bower/foundation';
    public $js = [
        '/js/foundation.min.js'
    ];
}

PS I checked the paths, everything was flooded, but I'm sure all the files are there. I feel that the problem is that the vendor is behind the frontend folder (and this is the root of the application, above which it apparently does not read scripts), but I don’t know how to fix this problem, although I may be wrong.
What is the problem?
4e0f3acf44224cfd9779f0e749211e04.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-04-11
@Gregpopov

public $sourcePath = '@vendor/bower/foundation';
    public $baseUrl = '@vendor';
 public $js = [
        '/js/foundation.min.js'
    ];

try like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question