浏览代码

fix viewer dev task

Raanan Weber 7 年之前
父节点
当前提交
8a15941265
共有 6 个文件被更改,包括 7 次插入7 次删除
  1. 1 1
      .vscode/tasks.json
  2. 1 2
      Tools/Gulp/config.json
  3. 0 1
      Tools/Gulp/gulpfile.js
  4. 1 0
      Viewer/package.json
  5. 3 2
      Viewer/webpack.config.js
  6. 1 1
      Viewer/webpack.gulp.config.js

+ 1 - 1
.vscode/tasks.json

@@ -66,7 +66,7 @@
                     "background": {
                     "background": {
                         "activeOnStart": true,
                         "activeOnStart": true,
                         "beginsPattern": "Project is running at",
                         "beginsPattern": "Project is running at",
-                        "endsPattern": "webpack: Compiled successfully."
+                        "endsPattern": "Compiled successfully."
                     }
                     }
                 }
                 }
             ],
             ],

+ 1 - 2
Tools/Gulp/config.json

@@ -1905,8 +1905,7 @@
                                 "glTF2Interface/babylon.glTF2Interface.d.ts"
                                 "glTF2Interface/babylon.glTF2Interface.d.ts"
                             ]
                             ]
                         }
                         }
-                    ],
-                    "minified": true
+                    ]
                 },
                 },
                 {
                 {
                     "destination": [
                     "destination": [

+ 0 - 1
Tools/Gulp/gulpfile.js

@@ -528,7 +528,6 @@ var buildExternalLibrary = function (library, settings, watch) {
                 });
                 });
 
 
                 if (minifiedOutputs.length) {
                 if (minifiedOutputs.length) {
-                    console.log("minifying");
                     build = build
                     build = build
                         .pipe(uglify())
                         .pipe(uglify())
                         .pipe(optimisejs())
                         .pipe(optimisejs())

+ 1 - 0
Viewer/package.json

@@ -36,6 +36,7 @@
         "typescript": "^2.9.2",
         "typescript": "^2.9.2",
         "uglifyjs-webpack-plugin": "^1.2.2",
         "uglifyjs-webpack-plugin": "^1.2.2",
         "webpack": "^4.16.0",
         "webpack": "^4.16.0",
+        "webpack-cli": "^3.0.8",
         "webpack-dev-server": "^3.1.4"
         "webpack-dev-server": "^3.1.4"
     },
     },
     "dependencies": {
     "dependencies": {

+ 3 - 2
Viewer/webpack.config.js

@@ -54,7 +54,7 @@ module.exports = /*[
             libraryTarget: 'umd',
             libraryTarget: 'umd',
             library: 'BabylonViewer',
             library: 'BabylonViewer',
             umdNamedDefine: true,
             umdNamedDefine: true,
-            devtoolModuleFilenameTemplate: '[relative-resource-path]'
+            devtoolModuleFilenameTemplate: '[absolute-resource-path]'
         },
         },
         resolve: {
         resolve: {
             extensions: ['.ts', '.js'],
             extensions: ['.ts', '.js'],
@@ -71,6 +71,7 @@ module.exports = /*[
             oimo: 'OIMO',
             oimo: 'OIMO',
             earcut: true
             earcut: true
         },
         },
+        mode: "development",
         devtool: 'source-map',
         devtool: 'source-map',
         plugins: [
         plugins: [
             new webpack.WatchIgnorePlugin([
             new webpack.WatchIgnorePlugin([
@@ -98,7 +99,7 @@ module.exports = /*[
             },
             },
             {
             {
                 test: /\.(woff|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
                 test: /\.(woff|ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
-                loader: 'base64-font-loader'
+                loader: 'base64-inline-loader?limit=1000&name=[name].[ext]'
             }]
             }]
         },
         },
         devServer: {
         devServer: {

+ 1 - 1
Viewer/webpack.gulp.config.js

@@ -25,7 +25,7 @@ module.exports = {
             "babylonjs-viewer-assets": __dirname + '/src/assets/index.ts'
             "babylonjs-viewer-assets": __dirname + '/src/assets/index.ts'
         }
         }
     },
     },
-    mode: "development",
+    mode: "production",
     module: {
     module: {
         rules: [{
         rules: [{
             test: /\.tsx?$/,
             test: /\.tsx?$/,