@@ -18,7 +18,7 @@
"watch": "concurrently --kill-others \"npm:watch-ts\" \"npm:watch-extra\" \"npm:watch-webpack\"",
"watch-ts": "tsc -watch",
"watch-extra": "cpx \"src/**/*.{vert,frag,glsl,scss,woff,woff2,ttf,otf,eot,svg,html,gql}\" build/src/ --watch",
- "build-webpack": "webpack --mode development",
+ "build-webpack": "webpack --mode production",
"watch-webpack": "webpack -w --mode development",
"model-server": "node build/src/servers/model/server.js",
"model-server-watch": "nodemon --watch build/src build/src/servers/model/server.js"
@@ -51,7 +51,7 @@ export function SetCurrentObject(ctx: PluginContext) {
}
export function Update(ctx: PluginContext) {
- PluginCommands.State.Update.subscribe(ctx, ({ state, tree }) => ctx.runTask(state.updateTree(tree)));
+ PluginCommands.State.Update.subscribe(ctx, ({ state, tree, doNotLogTiming }) => ctx.runTask(state.updateTree(tree, doNotLogTiming)));
export function ApplyAction(ctx: PluginContext) {
@@ -17,7 +17,7 @@ export const PluginCommands = {
State: {
SetCurrentObject: PluginCommand<{ state: State, ref: Transform.Ref }>(),
ApplyAction: PluginCommand<{ state: State, action: StateAction.Instance, ref?: Transform.Ref }>(),
- Update: PluginCommand<{ state: State, tree: State.Tree | State.Builder }>(),
+ Update: PluginCommand<{ state: State, tree: State.Tree | State.Builder, doNotLogTiming?: boolean }>(),
RemoveObject: PluginCommand<{ state: State, ref: Transform.Ref }>(),
@@ -70,7 +70,7 @@ export const AnimateModelIndex = PluginStateAnimation.create({
});
- await PluginCommands.State.Update.dispatch(ctx.plugin, { state, tree: update });
+ await PluginCommands.State.Update.dispatch(ctx.plugin, { state, tree: update, doNotLogTiming: true });
if (params.mode.name === 'once' && isEnd) return { kind: 'finished' };
if (params.mode.name === 'palindrome') return { kind: 'next', state: { palindromeDirections } };
@@ -49,6 +49,8 @@ const sharedConfig = {
}),
new webpack.DefinePlugin({
__PLUGIN_VERSION_TIMESTAMP__: webpack.DefinePlugin.runtimeValue(() => `${new Date().valueOf()}`, true),
+ // include this for production version of React
+ // 'process.env.NODE_ENV': JSON.stringify('production')
new MiniCssExtractPlugin({ filename: 'app.css' })
],