Element: [Bug Report] PopperJS is not a constructor

Created on 16 Jun 2018  ·  5Comments  ·  Source: ElemeFE/element

Element UI version

2.4.1

OS/Browsers version

Win10/Chrome

Vue version

2.5.16

Reproduction Link

jsfiddle

Steps to reproduce

按照官网的demo 写select 组件,组件点击出现PopperJS is not a constructor

What is Expected?

期望如官网的效果

What is actually happening?

select 样式错乱, 报 “PopperJS is not a constructor”错误

All 5 comments

Translation of this issue:

Element UI version
2.4.1

OS/Browsers version
Win10/Chrome

Vue version
2.5.16

Reproduction Link
jsfiddle

Steps to reproduce
Write select components according to demo of official website. Click PopperJS is not a constructor components.

What is Expected?
Expect the effect of the official network

What is actually happening?
Select style is disordered, reporting "PopperJS is not a constructor" error.

Issues without a valid reproduction link will be closed directly.

You must config in babel-loader exclude options below code

rules: [
    {
        loader: 'babel-loader',
        include: [ __dirname + '/src/, __dirname + '../node_modules/element-ui/src/utils'],
        // exclude elemet-ui umd modules ref by https://github.com/ElemeFE/element/blob/4b3edc13abbac373d58503f9bc5223a7853d6df0/build/config.js
        exclude: /node_modules\/element-ui\/src\/(utils\/popper\.js|utils\/date.\js)/
   }, ...

This is the correct way of excluding modules for windows.

/node_modules\element-ui\src\(utils\popper.js|utils\date.js)/

what for vue/cli 3+?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

smallpath picture smallpath  ·  3Comments

yorululu picture yorululu  ·  3Comments

fscardua picture fscardua  ·  3Comments

yubo111 picture yubo111  ·  3Comments

zhguokai picture zhguokai  ·  3Comments