【发布时间】:2020-08-05 22:19:03
【问题描述】:
我在使用 vuetify 时遇到了这个错误: DevTools 无法加载 SourceMap:无法加载 webpack:///node_modules/vuetify/dist/vuetify.js.map 的内容:HTTP 错误:状态码 404,net::ERR_UNKNOWN_URL_SCHEME 我使用 webpack
我尝试创建 vutify 组件,某些元素显示不正确,似乎缺少 css
我在 Google Chrome 下的源代码中看到过,我可以看到 vuetify/dist 目录,但它不包含 vuetify.js.map 文件。 我使用了以下项目:github.com/TrilonIO/aspnetcore-Vue-starter
有什么要添加到 webpack.config.js 文件来管理地图文件的吗?
我在 webpack.config.js 中有这个地图文件:
plugins: [
new VueLoaderPlugin(),
new webpack.DllReferencePlugin({
context: __dirname,
manifest: require('./wwwroot/dist/vendor-manifest.json')
})
].concat(isDevBuild ? [
// Plugins that apply in development builds only
new webpack.SourceMapDevToolPlugin({
filename: '[file].map', // Remove this line if you prefer inline source maps
moduleFilenameTemplate: path.relative(bundleOutputDir, '[resourcePath]') // Point sourcemap entries to the original file locations on disk
})
] : [
extractCSS,
// Compress extracted CSS.
new OptimizeCSSPlugin({
cssProcessorOptions: {
safe: true
}
})
])
非常感谢。我明白问题出在哪里了:我忘记使用 v-app 标签了
在 IIS 上构建和发布站点时,我遇到了另一个问题。 Vuetify 组件不会显示为好像未安装该库...
【问题讨论】:
标签: webpack vuetify.js