Static GitHub Issues

[415] ReferenceError: self is not defined

prev: AdminLTE 2 (Bootstrap 3) theme and <nuxt-link> issue
next: window is not defined

I want to use http://element.eleme.io/#/en-US with nuxt, But when I config the loader like:

loaders: [
      {
        test: /\.css$/,
        loader: 'style-loader!css-loader'
      },
      {
        test: /\.(eot|svg|ttf|woff|woff2)(\?\S*)?$/,
        loader: 'file-loader'
      },
      {
        test: /\.(png|jpe?g|gif|svg)(\?\S*)?$/,
        loader: 'file-loader',
        query: {
          name: '[name].[ext]?[hash]'
        }
      }
    ]

I got the error ReferenceError: self is not defined, mybe conflict with nuxt.

when I remove this custome loaders, I got

Error: Module parse failed: /home/hxh/share/new-awesomes/node_modules/.1.2.5@element-ui/lib/theme-default/index.css Unexpected character '@' (1:0)

So this loaders must be added to the config to make element-ui work.

How I can resovle this error?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c359">#c359</a>)</em></sub></div>