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
{{ message }}
Repository navigation
Production build doesn't hook up JS and JS.MAP files #1832
Tried to build prod version with ng build --prod but faced with an issue - it hooked up css and css.map files, that wrote in my angular-cli-build.js, but ignored .js and .js.map files at all exept defaults, such as zone.js, etc.
When I execute ng build - all works fine. It hooked up all files, include js and js.map.
Prod mode bundles according to your SystemJS config. If there are missing files there, it's probably because there's not listed in that config as a global library.
@filipesilva until it does allow you to import global libraries, what's the fix for this? We are seeing JS files being left out of dist despite including them in angular-cli-build.js:
var Angular2App = require('angular-cli/lib/broccoli/angular2-app');
module.exports = function(defaults) {
return new Angular2App(defaults, {
vendorNpmFiles: [
...,
'primeng/**/*.+(js|js.map)',
'primeui/**/*.+(min.js|css|png)'
]
});
};
and system-config.js (both map and packages):
/***********************************************************************************************
* User Configuration.
**********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {
'primeng': 'vendor/primeng',
'primeui': 'vendor/primeui'
};
/** User packages configuration. */
const packages: any = {
'primeng': { defaultExtension: 'js' },
'primeui': { defaultExtension: 'js' }
};
using:
angular-cli: 1.0.0-beta.10
node: 6.3.1
os: darwin x64
Activity
filipesilva commentedon Aug 28, 2016
Prod mode bundles according to your SystemJS config. If there are missing files there, it's probably because there's not listed in that config as a global library.
The difficulty in correctly configuring everything for bundling was part of the reason that lead us to move to webpack (#1455). You can upgrade using these instructions: https://github.com/angular/angular-cli#webpack-preview-release-update
Bear in mind though, that the latest webpack release doesn't yet allow you to import global libraries but will soon.
textbook commentedon Aug 30, 2016
@filipesilva until it does allow you to import global libraries, what's the fix for this? We are seeing JS files being left out of
distdespite including them inangular-cli-build.js:and
system-config.js(bothmapandpackages):using:
filipesilva commentedon Sep 21, 2016
We've now released webpack to latest, including this functionality. See https://github.com/angular/angular-cli#webpack-update to update.
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.