博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
cssSourceMap: true 的作用
阅读量:6860 次
发布时间:2019-06-26

本文共 1487 字,大约阅读时间需要 4 分钟。

hot3.png

我们项目中会写很多样式,但是在浏览器打开控制台可能看不到这段css是在哪写的

var path = require('path')module.exports = {  build: { // production 环境    env: require('./prod.env'), // 使用 config/prod.env.js 中定义的编译环境    index: path.resolve(__dirname, '../dist/index.html'), // 编译输入的 index.html 文件    assetsRoot: path.resolve(__dirname, '../dist'), // 编译输出的静态资源路径    assetsSubDirectory: 'static', // 编译输出的二级目录    assetsPublicPath: '/', // 编译发布的根目录,可配置为资源服务器域名或 CDN 域名    productionSourceMap: true, // 是否开启 cssSourceMap    // Gzip off by default as many popular static hosts such as    // Surge or Netlify already gzip all static assets for you.    // Before setting to `true`, make sure to:    // npm install --save-dev compression-webpack-plugin    productionGzip: false, // 是否开启 gzip    productionGzipExtensions: ['js', 'css'] // 需要使用 gzip 压缩的文件扩展名  },  dev: { // dev 环境    env: require('./dev.env'), // 使用 config/dev.env.js 中定义的编译环境    port: 8080, // 运行测试页面的端口    assetsSubDirectory: 'static', // 编译输出的二级目录    assetsPublicPath: '/', // 编译发布的根目录,可配置为资源服务器域名或 CDN 域名    proxyTable: {}, // 需要 proxyTable 代理的接口(可跨域)    // CSS Sourcemaps off by default because relative paths are "buggy"    // with this option, according to the CSS-Loader README    //(https://github.com/webpack/css-loader#sourcemaps)    // In our experience, they generally work as expected,    // just be aware of this issue when enabling this option.    cssSourceMap: true //开启    是否开启 cssSourceMap默认为false  }}

css

转载于:https://my.oschina.net/u/3608045/blog/1830063

你可能感兴趣的文章
Jetbrains Idea 内 CoffeeScript 的 mocha 单元测试的配置
查看>>
SSH 端口转发
查看>>
Spring AOP根据JdbcTemplate方法名动态设置数据源
查看>>
sublime3学习笔记2:编辑
查看>>
字节缓冲[转载]
查看>>
又做梦了..
查看>>
抽象代数的研究对象辨析
查看>>
我的友情链接
查看>>
英特尔至强系列处理器发布计划曝光
查看>>
Java集合框架总结(4)——List接口的使用
查看>>
Java几款性能分析工具的对比
查看>>
Azure手把手系列 1:微软中国公有云概述
查看>>
Nagios设置飞信报警
查看>>
php配置手册
查看>>
使用 mysqldump 迁移 MySQL 数据-企业实战
查看>>
java 学习笔记6-集合
查看>>
H3C ACL应用到接口的几种命令
查看>>
"岛主" 同学给我出的算法题
查看>>
GDI+ 学习记录(18): 闭合曲线 - ClosedCurve
查看>>
JAVA注解Annotation
查看>>