繁体   English   中英

将PrimeNG与DllBundlesPlugin一起使用

[英]Using PrimeNG with the DllBundlesPlugin

我想使用PrimeNG的一些组件,但在尝试通过DllBundlesPlugin包含它时遇到一些错误。

DllBundlesPlugin配置:

new DllBundlesPlugin({
      bundles: {
        polyfills: [
          'core-js',
          'zone.js'
        ],
        vendor: [
          '@angular/platform-browser',
          '@angular/platform-browser-dynamic',
          '@angular/core',
          '@angular/common',
          '@angular/forms',
          '@angular/http',
          '@angular/router',
          '@angularclass/hmr',
          'rxjs',
       '@ngui/auto-complete',
      'ngx-bootstrap',
      '@swimlane/ngx-datatable',
      'primeng/primeng'
    ]
  },
  dllDir: './web/dist/vendor/',
  webpackConfig: {
    devtool: 'cheap-module-source-map',
    plugins: [] // DllBundlesPlugin will set the DllPlugin here
  }
})

错误:

错误:包名称不匹配,预期primeng / primeng但找到了primeng

使用primeng而不是primeng/primeng导致Cannot find module 'primeng'

如果没有简单的解决方法,是否有其他方式使用PrimeNG(没有插件)?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM