我使用 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'