Một trong các module tính năng của tôi có nội dung này:góc 4 - Lỗi gặp phải giải quyết các giá trị biểu tượng tĩnh
declare function require(name: string);
@NgModule({
imports: [
// other modules here
ChartModule.forRoot(
require('highcharts'),
require('highcharts/highcharts-more'),
require('highcharts/modules/funnel'),
require('highcharts/modules/heatmap')
)
Nó chạy tốt tại địa phương nhưng khi tôi xây dựng nó với cờ prod nó không thành công. Lỗi tôi nhận được là:
ERROR in Error encountered resolving symbol values statically. Reference to a non-exported function (position 26 :18 in the original .ts file), resolving symbol ....
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in ...
Bất kỳ ý tưởng nào về cách giải quyết vấn đề này?
Tôi có một vấn đề tương tự, nhưng với 'const' xuất khẩu – KarolDepka