我刚刚尝试在我的Vue应用中安装[Vue-double-list] [1]。 我无法编译Webpack,但是我不知道如何解决它。 我用postcss。
module: {
rules: [
{
test: /\.css$/,
use: [
'vue-style-loader',
{ loader: 'css-loader', options: { importLoaders: 1 } },
'postcss-loader'
],
}, {
test: /\.vue$/,
loader: 'vue-loader',
options: {
postcss: [require('postcss-cssnext')()],
loaders: {
}
// other vue-loader options go here
}
},
这是失败的
./node_modules/vue-double-list/index.js
Module parse failed: Unexpected token (1:20)
You may need an appropriate loader to handle this file type.
| export default from './dist/vue-double-list.common'
| export * from './dist/vue-double-list.common'
| import './dist/vue-double-list.css'
@ ./src/main.js 11:0-41
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-
server ./src/main.js