添加sourcemap

This commit is contained in:
Harvey Zack committed 2018-12-07 11:07:56 +08:00
1 parent 03605262bd
commit 01e16b042c
18 files changed
+119 -49

No files matched your search

+2
View File
@@ -33,6 +33,7 @@ module.exports = function creatRollupConfig(projectPath) {
: path.join(process.cwd(), `docs/uncompiled/${name}.js`),
format: 'umd',
exports: 'named',
sourcemap: isProd ? false : true,
},
plugins: [
eslint({
@@ -40,6 +41,7 @@ module.exports = function creatRollupConfig(projectPath) {
}),
postcss({
plugins: [autoprefixer, cssnano],
sourceMap: isProd ? false : true,
extract: isProd
? path.join(projectPath, `dist/${name}.css`)
: path.join(process.cwd(), `docs/uncompiled/${name}.css`),