File "webpack.config.js"
Full Path: /home/warrior1/public_html/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-publicize/webpack.config.js
File size: 1.38 KB
MIME-type: text/plain
Charset: utf-8
const path = require( 'path' );
const jetpackWebpackConfig = require( '@automattic/jetpack-webpack-config/webpack' );
module.exports = [
{
entry: {
[ 'classic-editor-share-limits' ]: './src/js/classic-editor-share-limits.js',
[ 'classic-editor-connections' ]: './src/js/classic-editor-connections.js',
},
mode: jetpackWebpackConfig.mode,
devtool: jetpackWebpackConfig.isProduction ? false : 'source-map',
output: {
...jetpackWebpackConfig.output,
path: path.resolve( './build' ),
},
optimization: {
...jetpackWebpackConfig.optimization,
},
resolve: {
...jetpackWebpackConfig.resolve,
},
node: false,
plugins: [ ...jetpackWebpackConfig.StandardPlugins() ],
module: {
strictExportPresence: true,
rules: [
// Transpile JavaScript
jetpackWebpackConfig.TranspileRule( {
exclude: /node_modules\//,
} ),
// Transpile @automattic/* in node_modules too.
jetpackWebpackConfig.TranspileRule( {
includeNodeModules: [ '@automattic/' ],
} ),
// Handle CSS.
jetpackWebpackConfig.CssRule( {
extensions: [ 'css', 'sass', 'scss' ],
extraLoaders: [
{
loader: 'postcss-loader',
options: {
postcssOptions: { config: path.join( __dirname, 'postcss.config.js' ) },
},
},
'sass-loader',
],
} ),
// Handle images.
jetpackWebpackConfig.FileRule(),
],
},
},
];