1
0
Van 6 жил өмнө
parent
commit
70833b330a

+ 1 - 2
CHANGELOG.md

@@ -1,7 +1,6 @@
 ## Vditor change log
 
-### v1.1.0 / 2019-03-20
-
+### v1.1.1 / 2019-03-20
 
 * [29](https://github.com/b3log/vditor/issues/29) 代码块添加复制 `feature`
 * [28](https://github.com/b3log/vditor/issues/28) 编辑器中按下Ctrl+s 会出现字符 `question`

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "vditor",
-  "version": "1.1.0",
+  "version": "1.1.1",
   "description": "A markdown editor written in TypeScript",
   "author": " Vanessa <[email protected]> (http://vanessa.b3log.org)",
   "homepage": "https://hacpai.com/cr",

+ 1 - 1
src/ts/toolbar/Preview.ts

@@ -16,7 +16,7 @@ export class Preview extends MenuItem {
         this.element.children[0].addEventListener("click", function() {
             const vditorElement = document.getElementById(vditor.id);
             let className;
-            if (vditor.preview.element.style.display === "block") {
+            if (vditor.preview.element.style.display === "block" || vditor.preview.element.style.display === "") {
                 vditor.preview.element.style.display = "none";
                 className = `vditor-tooltipped vditor-tooltipped__${menuItem.tipPosition}`;
             } else {

+ 11 - 1
webpack.config.js

@@ -12,7 +12,8 @@ const CleanWebpackPlugin = require('clean-webpack-plugin')
 const MiniCssExtractPlugin = require('mini-css-extract-plugin')
 const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
 const WebpackOnBuildPlugin = require('on-build-webpack')
-const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
+const BundleAnalyzerPlugin = require(
+  'webpack-bundle-analyzer').BundleAnalyzerPlugin
 const pkg = require('./package.json')
 
 const banner = new webpack.BannerPlugin({
@@ -122,6 +123,15 @@ module.exports = [
       }),
       banner,
     ],
+    optimization: {
+      splitChunks: {
+        cacheGroups: {
+          vendors: {
+            test: /null/,
+          }
+        }
+      },
+    },
   }, {
     mode: 'production',
     entry: {