Skip to content

Commit

Permalink
Merge pull request Automattic#103 in SPP/plugin-liveblogging from bun…
Browse files Browse the repository at this point in the history
…dle-size to master

* commit '8b3d09bb1493d870d2a8bc0d9b31dbf4ab954e63':
  webpack remove vendor file from build
  remove vendor file
  Cleanup rxjs import
  dynamic webpack chunk loading
  code splitting editorcontainer, react-loadable, es2015
  [WIP] Cleanup build
  • Loading branch information
Hall, Cain committed Jul 2, 2018
2 parents bf76283 + 8b3d09b commit 884ce5e
Show file tree
Hide file tree
Showing 3 changed files with 384 additions and 15 deletions.
1 change: 0 additions & 1 deletion liveblog.php
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ public static function enqueue_scripts() {
wp_enqueue_style( self::KEY . '_theme', plugins_url( 'assets/theme.css', __FILE__ ) );

// Load Client Scripts
wp_enqueue_script( self::KEY . '_vendor', plugins_url( 'assets/vendor.min.js', __FILE__ ), array(), self::VERSION, true );
wp_enqueue_script( self::KEY, plugins_url( 'assets/app.min.js', __FILE__ ), array(), self::VERSION, true );

if ( self::is_liveblog_editable() ) {
Expand Down
6 changes: 0 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const path = require('path');
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

const paths = {
entry: './src/react/index.js',
Expand All @@ -16,7 +15,6 @@ const webpackConfig = {
entry: {
app: path.join(__dirname, paths.entry),
amp: path.join(__dirname, './src/react/amp.js'),
vendor: ['react', 'moment', 'redux', 'react-dom'],
},

output: {
Expand Down Expand Up @@ -103,11 +101,7 @@ const webpackConfig = {
__TEST__: JSON.stringify(process.env.NODE_ENV === 'test'),
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
}),
// new BundleAnalyzerPlugin(),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
}),
],
};

Expand Down
Loading

0 comments on commit 884ce5e

Please sign in to comment.