-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build correctly #25
Comments
The reason for this is that the |
Switching to stubModules: ['json', 'text', 'hbars'],
modules: [
{
name: 'base',
include: ['css', 'less', 'templates'],
excludeShallow: ['css/css-builder', 'less/lessc-server', 'less/lessc']
}
] builds without problems but still requests |
This is a common issue and is typically because the package / map configuration is injected later in the build after the request to CSS is made. Try including your configuration file in the build layer before the css module. For previous discussion on the issue see guybedford/require-css#63. |
As written above adding any |
Hmm it should be working when the configuration is built into the layer (by having |
No there is no `define('vendors/require-css/css'); The map file is included and there are |
Ok that seems fine actually. The issue sounds like the configuration one still. You need to be sure that the package configuration has already been applied before it tries to load Perhaps check that the configuration is in the layer before these define scripts again. You can also test early configuration by inserting the following as the first script in the browser page:
|
I manually inserted the snippet you posted above inside my <script type="text/javascript">
// RequireJS config
var require = {
baseUrl: "/",
waitSeconds: 45,
packages: [
{
name: 'css',
main: 'css',
location: 'vendors/require-css'
}
]
};
</script>
<script data-main="base" type="text/javascript" src="/vendors/requirejs/requirejs.js"></script> but it still makes two http requests, one to |
What if you try adding the following below the snippet:
|
Below the snippet fails because |
Ok perhaps try changing it to It sounds like that will work. Then that means that the issue is that the names are being built incorrectly into the layer, which seems very odd. A temporary fix to work this out at the build level could be to try using |
Sorry - I see that the |
I've just tested the latest version of Perhaps it would be easiest if you can send a test repo and I can try and look into this for you? |
This results in
Did you use
Will try to set something up |
The error is exactly right for the module being empty. But at the request level it has stopped the requests. When you have the file written in as I have examples using both - the example folder in the RequireLESS plugin uses package config due to the map error. The example in the RequireCSS plugin for use on its own uses map config. |
Hey I'm trying to use require-less and require-css in a build config but I can't seem to get it working. The setup is the following:
This build correctly using the grunt task but it a request to
css.js
is still made and of course fails in the built version. Adding amap
configuration as suggested results in the following error while building:Any help would be really appreciated!
The text was updated successfully, but these errors were encountered: