Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Webpack 迁移到网页2,未找到模块:错误:Can';t解决';出口';_Webpack - Fatal编程技术网

Webpack 迁移到网页2,未找到模块:错误:Can';t解决';出口';

Webpack 迁移到网页2,未找到模块:错误:Can';t解决';出口';,webpack,Webpack,我正在尝试将我当前的项目(在Angular2上)迁移到webpack2。 这是我的网页包配置: 但我有一个错误: ERROR in ./app/common/forms/ckeditor.component.ts Module not found: Error: Can't resolve 'exports' in '/home/al1/projects/voltmobi/ytaxiweb/ui/app/common/forms' BREAKING CHANGE: It's no longe

我正在尝试将我当前的项目(在Angular2上)迁移到webpack2。 这是我的网页包配置:

但我有一个错误:

ERROR in ./app/common/forms/ckeditor.component.ts
Module not found: Error: Can't resolve 'exports' in 
'/home/al1/projects/voltmobi/ytaxiweb/ui/app/common/forms'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.
             You need to specify 'exports-loader' instead of 'exports',
             see https://webpack.js.org/guides/migrating/#automatic-loader-module-name-extension-removed
但是我不使用exports loader,它也不在webpack1的配置中

模块中导致错误的字符串:

 import { Constants } from 'config/constants'
用于导入的模块如下所示:

export class Constants {
  static API = {
    PATH: '/web_api'
  }
}
我是个网页新手

也许我错了,我的问题出在:

let loadCKEDITOR = require('bundle-loader?lazy!exports?window.CKEDITOR!ckeditor/ckeditor')

您没有在配置中使用
导出加载程序
,但您指定了它:

如错误所示,这应该是导出加载程序

let loadCKEDITOR = require('bundle-loader?lazy!exports-loader?window.CKEDITOR!ckeditor/ckeditor')
let loadCKEDITOR = require('bundle-loader?lazy!exports-loader?window.CKEDITOR!ckeditor/ckeditor')