UNPKG

inegicomponentes-tabulador

Version:

Componentes de visualizacion 2023 - Tabuladores

110 lines (107 loc) 3.76 kB
const path = require('path'); const HtmlPlugin = require('html-webpack-plugin'); const JsonMinimizerPlugin = require("json-minimizer-webpack-plugin"); // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; const configCommonjs = { // mode:'production', // cache:true, name:"commonjs", mode:'development', entry: { index:'./src/puente.js', }, output: { path:path.join(__dirname, '/dist/'), filename:'inegicomponentes.tabulador.js', }, resolve:{ extensions:['.js','.jsx'] }, module:{ rules:[ { test: /\.(js|jsx)$/, use:['babel-loader'], exclude:path.join(__dirname, "/node_modules/") }, { test: /\.css$/, use: [ 'style-loader', 'css-loader' ] }, { test: /\.json$/i, type: "json", }, ] }, optimization: { minimize: true, minimizer: [ new JsonMinimizerPlugin(), ] }, plugins:[ new HtmlPlugin({ template:'./src/index.html' }), // new BundleAnalyzerPlugin({}), ], devServer:{ port:9999, liveReload:true, // open:false host:'127.0.0.1', compress:false, } } // configuración para Modulo node js const configModulejs = { // mode:'production', // cache:true, name:"modulejs", mode:'development', entry: { index:'./src/puente.mod.js', }, output: { path:path.join(__dirname, '/dist/'), filename:'inegicomponentes.tabulador.mod.js', libraryTarget:"module" }, experiments: { outputModule: true, }, resolve:{ extensions:['.js','.jsx'] }, module:{ rules:[ { test: /\.(js|jsx)$/, use:['babel-loader'], exclude:path.join(__dirname, "/node_modules/") }, { test: /\.css$/, use: [ 'style-loader', 'css-loader' ] }, { test: /\.json$/i, type: "json", }, ] }, /* optimization: { minimize: true, minimizer: [ new JsonMinimizerPlugin(), ] } */ } module.exports = [configCommonjs, configModulejs];