BaseURL not working in grunt config
Closed this issue · 1 comments
atardadi commented
Hi,
I'm getting this weird error when bundling my files.
Unable to calculate canonical name to bundle SOME_PREFIX/playalong_web/components/text-size-slider/text-size-slider.module.js. Ensure that this module sits within the baseURL or a wildcard path config.
The correct path should be:
SOME_PREFIX/playalong_web/app/components/text-size-slider/text-size-slider.module.js.
My Grunt config is this:
systemjs: {
options: {
baseURL: "./app",
configFile: "./app/system.config.js",
minify: true,
},
dist: {
files: [{
"src": "./app/app.js",
"dest": "./dist/app.min.js"
}]
}
},
Could you please help me figuring this out? I'm losing it here.
Thanks in advance!
marcalj commented
I need to use baseURL: '.'
to work.
Example:
systemjs: {
options: {
sfx: true,
// baseURL: '<%= yeoman.app %>',
baseURL: '.',
// configFile: '<%= yeoman.app %>/systemjs.config.js',
configFile: './app/systemjs.config.js',
minify: true,
build: {
mangle: false
}
},
dist: {
files: [{
'src': '.tmp/scripts/app.js',
'dest': '.tmp/scripts/app.build.js'
}]
},
distHelp: {
files: [{
'src': '.tmp/scripts/app.help.js',
'dest': '.tmp/scripts/app.help.build.js'
}]
}
}