View | Details | Raw Unified | Return to bug 17297
Collapse All | Expand All

(-)a/package.json (+17 lines)
Line 0 Link Here
1
{
2
  "name": "Koha",
3
  "description": "Koha Integrated Library System",
4
  "devDependencies": {
5
    "babel-core": "^6.14.0",
6
    "babel-loader": "^6.2.5",
7
    "babel-preset-react": "^6.11.1",
8
    "react": "^15.3.1",
9
    "react-dom": "^15.3.1",
10
    "webpack": "^1.13.2"
11
  },
12
  "repository": {
13
    "type": "git",
14
    "url": "git://git.koha-community.org/koha.git"
15
  },
16
  "license": "GPLv3"
17
}
(-)a/webpack-production.config.js (+39 lines)
Line 0 Link Here
1
var webpack = require('webpack');
2
3
module.exports = {
4
    entry: {
5
        moredetail: './koha-tmpl/intranet-tmpl/prog/js/public/moredetail.js',
6
    },
7
    output: {
8
        path: './koha-tmpl/intranet-tmpl/prog/js/app',
9
        filename: '[name].js' // Template based on keys in entry above
10
    },
11
    module: {
12
        loaders: [
13
            {
14
                test: /\.js$/,
15
                loader: 'babel-loader',
16
                query: {
17
                    presets: ['react']
18
                }
19
            }
20
        ]
21
    },
22
    resolve: {
23
        // you can now require('file') instead of require('file.js')
24
        extensions: ['', '.js', '.json']
25
    },
26
    plugins: [
27
        new webpack.DefinePlugin({
28
            'process.env':{
29
                'NODE_ENV': JSON.stringify('production')
30
            }
31
        }),
32
        new webpack.optimize.UglifyJsPlugin({
33
            compress:{
34
                warnings: true
35
            }
36
        })
37
    ]
38
};
39
(-)a/webpack.config.js (-1 / +25 lines)
Line 0 Link Here
0
- 
1
module.exports = {
2
    entry: {
3
        moredetail: './koha-tmpl/intranet-tmpl/prog/js/public/moredetail.js',
4
    },
5
    output: {
6
        path: './koha-tmpl/intranet-tmpl/prog/js/app',
7
        filename: '[name].js' // Template based on keys in entry above
8
    },
9
    module: {
10
        loaders: [
11
            {
12
                test: /\.js$/,
13
                loader: 'babel-loader',
14
                query: {
15
                    presets: ['react']
16
                }
17
            }
18
        ]
19
    },
20
    resolve: {
21
        // you can now require('file') instead of require('file.js')
22
        extensions: ['', '.js', '.json']
23
    }
24
};
25

Return to bug 17297