diff --git a/examples/web-chat/config/webpack.extend.js b/examples/web-chat/config/webpack.extend.js index 10ff3c1bde..ffe89b3db0 100644 --- a/examples/web-chat/config/webpack.extend.js +++ b/examples/web-chat/config/webpack.extend.js @@ -6,27 +6,27 @@ module.exports = { if (!config.resolve) config.resolve = {}; if (!config.resolve.fallback) config.resolve.fallback = {}; Object.assign(config.resolve.fallback, { - "buffer": require.resolve("buffer"), - "crypto": require.resolve("crypto-browserify"), - "stream": require.resolve("stream-browserify"), - // "assert": require.resolve("assert") - } - ) + buffer: require.resolve('buffer'), + crypto: require.resolve('crypto-browserify'), + stream: require.resolve('stream-browserify'), + // "assert": require.resolve("assert") + }); - if (!config.plugins) config.plugins = [] + if (!config.plugins) config.plugins = []; config.plugins.push( new webpack.DefinePlugin({ - 'process.env.ENV': JSON.stringify("dev"), + 'process.env.ENV': JSON.stringify('dev'), }) - ) + ); config.plugins.push( new webpack.ProvidePlugin({ process: 'process/browser.js', Buffer: ['buffer', 'Buffer'], - })); + }) + ); - if (!config.ignoreWarnings) config.ignoreWarnings = [] - config.ignoreWarnings.push(/Failed to parse source map/) + if (!config.ignoreWarnings) config.ignoreWarnings = []; + config.ignoreWarnings.push(/Failed to parse source map/); return config; }, @@ -35,28 +35,28 @@ module.exports = { if (!config.resolve) config.resolve = {}; if (!config.resolve.fallback) config.resolve.fallback = {}; Object.assign(config.resolve.fallback, { - "buffer": require.resolve("buffer"), - "crypto": require.resolve("crypto-browserify"), - "stream": require.resolve("stream-browserify"), - // "assert": require.resolve("assert") - } - ) + buffer: require.resolve('buffer'), + crypto: require.resolve('crypto-browserify'), + stream: require.resolve('stream-browserify'), + // "assert": require.resolve("assert") + }); - if (!config.plugins) config.plugins = [] + if (!config.plugins) config.plugins = []; config.plugins.push( new webpack.DefinePlugin({ - 'process.env.ENV': JSON.stringify("prod"), + 'process.env.ENV': JSON.stringify('prod'), }) - ) + ); config.plugins.push( new webpack.ProvidePlugin({ process: 'process/browser.js', Buffer: ['buffer', 'Buffer'], - })); + }) + ); - if (!config.ignoreWarnings) config.ignoreWarnings = [] - config.ignoreWarnings.push(/Failed to parse source map/) + if (!config.ignoreWarnings) config.ignoreWarnings = []; + config.ignoreWarnings.push(/Failed to parse source map/); return config; - } + }, }; diff --git a/examples/web-chat/package.json b/examples/web-chat/package.json index fe5eae26bb..2b16df5e53 100644 --- a/examples/web-chat/package.json +++ b/examples/web-chat/package.json @@ -37,9 +37,9 @@ "fix": "run-s fix:*", "test": "run-s build test:*", "test:lint": "eslint src --ext .ts --ext .tsx", - "test:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" --list-different", + "test:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" \"./config/*.js\" --list-different", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.{ts,tsx},public/**/*.html}\" -c ../../.cspell.json", - "fix:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" --write", + "fix:prettier": "prettier \"src/**/*.{ts,tsx}\" \"./*.json\" \"./config/*.js\" --write", "fix:lint": "eslint src --ext .ts --ext .tsx --fix", "proto": "run-s proto:*", "proto:build": "buf generate",