Opened 7 years ago

Closed 7 years ago

#16741 closed defect (invalid)

optimizeCSS should find the css file in releaseDir, not in the src

Reported by: jzw Owned by: Rawld Gill
Priority: undecided Milestone: 1.9
Component: BuildSystem Version: 1.9.0a1
Keywords: Cc:
Blocked By: Blocking:

Description

I use osgi constructor my project

  projectA
      static
          dojo
          dijit
          dojox
          util

  projectB
      web
         app
            resources
               app.css
  buildProject
      profiles
         app.profile.js
      release
         dojo
         dijit
         dojox
         app

in "projectB/web/app/resources/app.css", I import dojo.css

   @import url('../../dojo/resources/dojo.css');

app.profile.js's content is

    basePath: '../../',	
    releaseDir: './buildProject/release',
    defaultConfig: {
        ...
        async: 1,
        baseUrl: '../../dojo'
    },
    packages:[{
		name:"dojo",
		location:"./projectA/static/dojo"
	},{
		name:"dijit",
		location:"./projectA/static/dijit"
	},{
		name:"dojox",
		location:"./projectA/static/dojox"
	},{
		name:"app",
		location:"./projectB/web/app"
	}
    ]

When build, all is good except optimize css file that contains the import statement, throw errors

   

I trace the code in optimizeCss.js, the engeer found the "importResource" in src folder. I think it should found the "dojo/resources/dojo.css" in the releaseDir "buildProject/release" not in the "projectB/web" folder

Change History (2)

comment:1 Changed 7 years ago by jzw

the error is

error(359)  While optimizing a CSS file, 
an import directive was not expanded 
because the source for the import was not available to the builder.

the summary update to "optimizeCSS should find the css file in releaseDir, not in the source package"

Last edited 7 years ago by jzw (previous) (diff)

comment:2 Changed 7 years ago by Rawld Gill

Milestone: tbd1.9
Resolution: invalid
Status: newclosed

The CSS folding aggregates resources located in the source trees, not the release trees. In your example above, importing

../../dojo/resources/dojo.css

from

projectB/web/app/resources/app.css

result in

projectB/web/app/resources/../../dojo/resources/dojo.css
=
projectB/web/dojo/resources/dojo.css

and that file is not there, so there is no error.

Note: See TracTickets for help on using tickets.