ソースを参照

fix viewer dev task

Raanan Weber 7 年 前
コミット
8a15941265

+ 1 - 1
.vscode/tasks.json

@@ -66,7 +66,7 @@
                     "background": {
                         "activeOnStart": true,
                         "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"
                             ]
                         }
-                    ],
-                    "minified": true
+                    ]
                 },
                 {
                     "destination": [

+ 0 - 1
Tools/Gulp/gulpfile.js

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

+ 1 - 0
Viewer/package.json

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

+ 3 - 2
Viewer/webpack.config.js

@@ -54,7 +54,7 @@ module.exports = /*[
             libraryTarget: 'umd',
             library: 'BabylonViewer',
             umdNamedDefine: true,
-            devtoolModuleFilenameTemplate: '[relative-resource-path]'
+            devtoolModuleFilenameTemplate: '[absolute-resource-path]'
         },
         resolve: {
             extensions: ['.ts', '.js'],
@@ -71,6 +71,7 @@ module.exports = /*[
             oimo: 'OIMO',
             earcut: true
         },
+        mode: "development",
         devtool: 'source-map',
         plugins: [
             new webpack.WatchIgnorePlugin([
@@ -98,7 +99,7 @@ module.exports = /*[
             },
             {
                 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: {

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

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