{"size": 2104, "ext": "js", "max_stars_repo_path": "webpack.config.js", "max_stars_repo_name": "wwalc/ckeditor5-webpack2", "max_stars_repo_stars_event_min_datetime": "2018-04-28T20:43:19.000Z", "max_stars_repo_stars_event_max_datetime": "2018-04-28T20:43:19.000Z", "max_issues_repo_path": "webpack.config.js", "max_issues_repo_name": "wwalc/ckeditor5-webpack2", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack.config.js", "max_forks_repo_name": "wwalc/ckeditor5-webpack2", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.975308642, "max_line_length": 98, "alphanum_fraction": 0.4386882129}
/**
 * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
 */

/* jshint browser: false, node: true, strict: true */

'use strict';

const path = require( 'path' );
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const UglifyJsPlugin = require( 'webpack' ).optimize.UglifyJsPlugin;

module.exports = {
    context: __dirname,
    target: 'web',

    entry: [
        'regenerator-runtime/runtime',
        './assets/js/app'
    ],

    output: {
        path: './build',
        filename: 'js/app.bundle.js'
    },

    module: {
        rules: [
            {
                test: /\.js$/,
                include: [
                    path.resolve(__dirname, 'assets'), // your scripts
                    path.resolve(__dirname, 'node_modules/@ckeditor')
                ],
                use: [{
                    loader: 'babel-loader',
                    options: {
                        presets: [ 'es2015-webpack2' ],
                        cacheDirectory: true
                    }
                }]
            },
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract( {
                    fallbackLoader: 'style-loader',
                    loader: 'css-loader'
                } )
            },
            {
                test: /\.s[ac]ss$/,
                loader: ExtractTextPlugin.extract( {
                    fallbackLoader: 'style-loader',
                    loader: 'css-loader!sass-loader'
                } )
            },
            {
                test: /\/ckeditor5-.*\.svg$/,
                loader: 'raw-loader'
            }
            // NOTE: if you have other *.svg rule(s), add {exclude: /\/ckeditor5-/} option to them
        ]
    },

    resolve: {
        modules: [
            path.resolve( __dirname, 'packages' ),
            'node_modules'
        ]
    },

    plugins: [
        new ExtractTextPlugin( 'css/styles.css' ),
        new UglifyJsPlugin( {
            sourceMap: true
        } )
    ],

    devtool: 'source-map',
    stats: true
};