【问题标题】:What do these Webpack v3 ModuleConcatenationPlugin bailout messages mean?这些 Webpack v3 ModuleConcatenationPlugin 救助消息是什么意思?
【发布时间】:2018-01-13 23:20:51
【问题描述】:

我使用 Webpack 3 获得此输出,使用 ModuleConcatenationPlugin:

  [11] (webpack)/buildin/global.js 509 bytes {0} [built]
       ModuleConcatenation bailout: Module is not an ECMAScript module
  [54] multi ./src/index.js 28 bytes {0} [built]
       ModuleConcatenation bailout: Module is not an ECMAScript module
  [55] ./src/index.js + 33 modules 238 kB {0} [built]
       ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: multi ./src/index.js (referenced with single entry)

Webpack 自己的文件 ((webpack)/buildin/global.js) 阻止连接?

src/index.js 看起来像这样:

import Calendar from './Calendar'
import DoubleSidedPlane from './DoubleSidedPlane'
import Grid from './Grid'
import Molecule from './Molecule'
import Plane from './Plane'
import PushMenuLayout from './PushMenuLayout'

import * as utils from './utils'
import * as core from './core'
import * as html from './html'
import * as components from './components'

export {
    Calendar,
    DoubleSidedPlane,
    Grid,
    Molecule,
    Plane,
    PushMenuLayout,

    utils,
    core,
    html,
    components,
}

export const version = '17.0.4'

【问题讨论】:

  • 你的 .babelrc 是什么样子的?

标签: javascript webpack webpack-3


【解决方案1】:

global.js 不会阻止所有模块的串联。该错误意味着这些特定模块未连接。您需要 ES6 模块才能使 ModuleConcatenationPlugin 工作。

【讨论】:

    猜你喜欢
    • 2011-09-07
    • 1970-01-01
    • 1970-01-01
    • 2010-10-01
    • 2015-06-22
    • 1970-01-01
    • 1970-01-01
    • 2015-04-14
    • 1970-01-01
    相关资源
    最近更新 更多