You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
define(['require', 'jquery', 'css!home'], function(require, $) {
var common = require('common/common');
console.log(common);
});
It throws error "Uncaught Error: Module name "common/common" has not been loaded yet for context: _".
But when I use code: http://requirejs.org/docs/node.html#2
define(function(require) {
var common = require('common/common');
console.log(common);
});
It works;
How can I use both require-css and commonJs Module? Thank you.
The text was updated successfully, but these errors were encountered:
@Lorde-Y if I understand ur example correctly, then for doing that, I need to rework require-css codebase, and provide real bundled JS file, at least minified version, to contain full code, so that we can use CJS approach. I will try to work on it this weekend maybe. I'm also personally interested in this, because my project has odd require() of this component.
when i use like this:
It throws error "Uncaught Error: Module name "common/common" has not been loaded yet for context: _".
But when I use code: http://requirejs.org/docs/node.html#2
It works;
How can I use both
require-css
andcommonJs
Module? Thank you.The text was updated successfully, but these errors were encountered: