mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

budparr
09.47.2018 75bde5d0953283f7230a69c964e1c257ff9892e2
Hash assets

Fixes #60
1 files modified
2 files renamed
29 ■■■■■ changed files
src/webpack.config.js 29 ●●●●● patch | view | raw | blame | history
static/dist/app.4820926d6a88a9adbe776b0b5c678846.css patch | view | raw | blame | history
static/dist/app.fab48d8a2f2e6b5fd864.js patch | view | raw | blame | history
src/webpack.config.js
@@ -1,6 +1,6 @@
var path = require("path");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var webpack = require("webpack");
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var webpack = require('webpack');
module.exports = {
    entry: {
        app: './js/main.js'
@@ -21,7 +21,7 @@
            {
                test: /\.css$/,
                use: ExtractTextPlugin.extract({
                    fallback: "style-loader",
                    fallback: 'style-loader',
                    use: 'css-loader?importLoaders=1!postcss-loader'
                })
            }
@@ -29,22 +29,27 @@
    },
    output: {
    path: path.join(__dirname, "./../static/dist"),
        filename: '[name].bundle.js',
        path: path.join(__dirname, './../static/dist'),
        filename: '[name].[chunkhash].js'
    },
    resolve: {
        modules: [path.resolve(__dirname, 'src'), 'node_modules'],
        modules: [path.resolve(__dirname, 'src'), 'node_modules']
    },
    plugins: [
        new ExtractTextPlugin("main.css"),
        new webpack.ProvidePlugin({
            $: "jquery",
            jQuery: "jquery"
        new ExtractTextPlugin({
            filename: getPath => {
                return getPath('[name].[contenthash].css');
            },
            allChunks: true
        })
        // new webpack.ProvidePlugin({
        //         $: "jquery",
        //         jQuery: "jquery"
        //     })
    ],
    watchOptions: {
        watch: true
    }
}
};
static/dist/app.4820926d6a88a9adbe776b0b5c678846.css
static/dist/app.fab48d8a2f2e6b5fd864.js