diff --git a/src/util/empty.js b/src/util/empty.js new file mode 100644 index 0000000000..436d4b781c --- /dev/null +++ b/src/util/empty.js @@ -0,0 +1 @@ +/* empty file that we alias some files to that we don't want to include */ diff --git a/webpack.config.js b/webpack.config.js index 4c9306e2a5..d4acef7f91 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -44,6 +44,18 @@ function createConfig(isProdBuild, latestBuild) { __VERSION__: JSON.stringify(VERSION), }), new CopyWebpackPlugin(copyPluginOpts), + // Ignore moment.js locales + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + // Color.js is bloated, it contains all color definitions for all material color sets. + new webpack.NormalModuleReplacementPlugin( + /@polymer\/paper-styles\/color\.js$/, + path.resolve(__dirname, 'src/util/empty.js') + ), + // Ignore roboto pointing at CDN. We use local font-roboto-local. + new webpack.NormalModuleReplacementPlugin( + /@polymer\/font-roboto\/roboto\.js$/, + path.resolve(__dirname, 'src/util/empty.js') + ), ]; if (latestBuild) {