Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babel-loader should exclude node_modules on testing iview*.js #36

Open
0xffff00 opened this issue Jan 22, 2018 · 0 comments
Open

babel-loader should exclude node_modules on testing iview*.js #36

0xffff00 opened this issue Jan 22, 2018 · 0 comments

Comments

@0xffff00
Copy link

webpack.base.config.js中与iview*.js对应的babel-loader规则也许应该加上: exclude: /node_modules/

            {
                test: /iview\/.*?js$/,
                loader: 'babel-loader' 
                exclude: /node_modules/  <------少了这一行,this line should be added
            },
            {
                test: /\.js$/,
                loader: 'babel-loader',
                exclude: /node_modules/
            },

不加的话,执行webpack时,windows下没问题,在linux上会报[BABEL] Note: The code generator has deoptimised the styling of "..." as it exceeds the max of "500KB". 最终编译出来的静态文件会报错
具体请参见:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant