我正在使用 Webpack(laravel 混合版本)并收到 Isotope 错误。谁能看到我做错了什么?
未找到此依赖项:* ./~/isotope-layout/js/layout-modes/masonry.js 中的砌体/砌体
这是我的 webpack 配置,我尝试应用同位素站点上显示的“修复”
const webpack = require('webpack')
const path = require('path')
const config = {
resolve: {
alias: {
'masonry': 'masonry-layout',
'isotope': 'isotope-layout'
}
},
entry: './src/index.js',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'vue-waypoint.js',
library: 'VueWaypoint',
libraryTarget: 'umd'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
{
test: /\.js$/,
include: path.resolve(__dirname, './src'),
exclude: /node_modules/,
use: "babel-loader"
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new webpack.LoaderOptionsPlugin({ minimize: true })
]
}
module.exports = config;