-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated dependencies - Enhanced security
- Loading branch information
Showing
19 changed files
with
6,488 additions
and
13,834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
18,741 changes: 6,063 additions & 12,678 deletions
18,741
classes/Visualizer/Gutenberg/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,108 @@ | ||
const webpack = require( 'webpack' ); | ||
const webpack = require('webpack'); | ||
const NODE_ENV = process.env.NODE_ENV || 'development'; | ||
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' ); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
|
||
module.exports = { | ||
externals: { | ||
externals: { | ||
'lodash': 'lodash' | ||
}, | ||
mode: NODE_ENV, | ||
entry: './src/index.js', | ||
output: { | ||
path: __dirname, | ||
filename: './build/block.js', | ||
chunkFilename: './build/[name].js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /.js?$/, | ||
use: [ { | ||
loader: 'babel-loader', | ||
options: { | ||
presets: [ '@babel/preset-env' ], | ||
plugins: [ | ||
'@babel/plugin-transform-async-to-generator', | ||
'@babel/plugin-proposal-object-rest-spread', | ||
[ | ||
'@babel/plugin-transform-react-jsx', { | ||
'pragma': 'wp.element.createElement' | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
'eslint-loader' ], | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.(css|scss)$/, | ||
use: [ { | ||
loader: MiniCssExtractPlugin.loader | ||
}, | ||
'css-loader', | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
plugins: [ | ||
require( 'autoprefixer' ) | ||
] | ||
} | ||
}, | ||
{ | ||
loader: 'sass-loader', | ||
query: { | ||
outputStyle: | ||
'production' === process.env.NODE_ENV ? 'compressed' : 'nested' | ||
} | ||
} ] | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif)$/, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { | ||
name: './[name].[ext]' | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
optimization: { | ||
mode: NODE_ENV, | ||
entry: { | ||
block: './src/index.js' | ||
}, | ||
output: { | ||
path: __dirname, | ||
filename: './build/[name].js' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
presets: ['@babel/preset-env'], | ||
plugins: [ | ||
'@babel/plugin-transform-async-to-generator', | ||
'@babel/plugin-proposal-object-rest-spread', | ||
[ | ||
'@babel/plugin-transform-react-jsx', { | ||
'pragma': 'wp.element.createElement' | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.(css|scss)$/, | ||
use: [ | ||
{ | ||
loader: MiniCssExtractPlugin.loader | ||
}, | ||
'css-loader', | ||
{ | ||
loader: 'postcss-loader', | ||
options: { | ||
postcssOptions: { | ||
plugins: [ | ||
require('autoprefixer') | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
loader: 'sass-loader', | ||
options: { | ||
implementation: require('sass'), | ||
sassOptions: { | ||
outputStyle: NODE_ENV === 'production' ? 'compressed' : 'expanded' | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
test: /\.(png|jpe?g|gif)$/, | ||
use: [ | ||
{ | ||
loader: 'file-loader', | ||
options: { | ||
name: './[name].[ext]' | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
optimization: { | ||
splitChunks: { | ||
cacheGroups: { | ||
handsontable: { | ||
name: 'handsontable', | ||
test: /[\\/]node_modules[\\/]handsontable/, | ||
chunks: 'all' | ||
chunks: 'all', | ||
enforce: true | ||
} | ||
} | ||
} | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify( NODE_ENV ) | ||
}), | ||
new MiniCssExtractPlugin({ | ||
filename: './build/block.css', | ||
chunkFilename: './build/[name].css' | ||
}) | ||
] | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': JSON.stringify(NODE_ENV) | ||
}), | ||
new MiniCssExtractPlugin({ | ||
filename: './build/[name].css' | ||
}), | ||
new TerserPlugin({ | ||
terserOptions: { | ||
format: { | ||
comments: false // Disable comments | ||
} | ||
}, | ||
extractComments: false // Prevents LICENSE.txt generation | ||
}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.