Angular 2 Local AoT deployment moment
Does anyone know how to apply the moment.js language pack with AoT and rollup? In systemjs.config.js, a certain point-with-locales.js doesn't work with:
//in systemjs.config.js.
'moment': 'npm:moment/min/moment-with-locales.js',
//in component:
import moment from 'moment';
this.moment.locale('de');
let formattedDate = this.moment(value).format('L');
and gives the default result to 'en'.
In rollup-config.js file:
plugins: [
nodeResolve({jsnext: true, module: true}),
commonjs({
include: [
'node_modules/rxjs/**',
'node_modules/moment/min/**',
]
}),
uglify()
]
+3
source to share
No one has answered this question yet
Check out similar questions: