I'm submitting a...
[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
when building in prod mode with this:
import fr from '@angular/common/locales/fr';
registerLocaleData(fr);
the build whit the --prod option will fail with the stack:
ERROR in chunk main [initial]
[name].[chunkhash:20].bundle.js
Cannot read property 'range' of null
TypeError: Cannot read property 'range' of null
at enterNode (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:146:15)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:125:24)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:134:24)
at enterNode (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:149:18)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:138:25)
at enterNode (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:149:18)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:125:24)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:134:24)
at enterNode (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:149:18)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:125:24)
at getPathInAst (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:134:24)
at info.moduleScope.variables.forEach.variable (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:536:23)
at Array.forEach ()
at modulesWithInfo.forEach.info (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:524:34)
at Array.forEach ()
at ConcatenatedModule.source (/Users/adboul/Documents/repos/test-prod-build/node_modules/webpack/lib/optimize/ConcatenatedModule.js:516:19)
Expected behavior
should build with --prod
Angular version:
@angular/cli: 1.6.6
@angular/*: 5.2.2
Others:
works with @angular/*: 5.2.1
reproduction: https://github.com/adrienboulle/test-prod-build
I have started a new project with the ng cli and I have just added the registerLocaleData(fr) thing.
I've tracked the issue to this commit:
71f9eaa (it works again when I modify juste /common/locales/fr.js to it's previous state)
I'm submitting a...
Current behavior
when building in prod mode with this:
the build whit the --prod option will fail with the stack:
Expected behavior
should build with
--prodAngular version:
@angular/cli: 1.6.6
@angular/*: 5.2.2
Others:
works with @angular/*: 5.2.1
reproduction: https://github.com/adrienboulle/test-prod-build
I have started a new project with the
ng cliand I have just added theregisterLocaleData(fr)thing.I've tracked the issue to this commit:
71f9eaa (it works again when I modify juste
/common/locales/fr.jsto it's previous state)