Working JavaScript charts
[gpl/argeo-suite.git] / js / webpack.common.js
index 1f2f2a2b80d40c23590b34ff8305715fdde052fe..ba57965fd4aeceb226b08a643a85b3e907994e3c 100644 (file)
@@ -5,14 +5,13 @@ const path = require('path');
 
 module.exports = {
        entry: {
-               "geo": { 
-                       import: './src/geo/index.js',
-               }
+               "geo": './src/geo/index.js',
+               "chart": './src/chart/index.js',
        },
        output: {
                filename: '[name].[contenthash].js',
                path: path.resolve(__dirname, 'org.argeo.app.js/org/argeo/app/js'),
-                       publicPath:'/pkg/org.argeo.app.js',
+               publicPath: '/pkg/org.argeo.app.js',
                clean: true,
        },
        optimization: {
@@ -50,6 +49,13 @@ module.exports = {
                        filename: 'geo.html',
                        chunks: ['geo'],
                }),
+               new HtmlWebpackPlugin({
+                       title: 'Argeo Suite Chart JS',
+                       template: 'src/chart/index.html',
+                       scriptLoading: 'module',
+                       filename: 'chart.html',
+                       chunks: ['chart'],
+               }),
 
        ],
 };
\ No newline at end of file