I use Heroku to host my application and webpack to create it.
Basically, I'm trying to deploy my application, but it doesn't work at all.
The post installation does not seem to occur, because when I load the page, it lacks the bundle.js file (which is created via webpack).
Here are my package.json scripts:
"main": "server.js", "scripts": { "dev": "webpack-dev-server --devtool eval --content-base build/ --colors --hot", "start": "node server.js", "postinstall": "webpack -p --config webpack.prod.config.js --progress" }
When I click my project on the hero, an error does not appear during the process. I see in the console that it launches my postinstall:
remote:> pistou@1.0.0 postinstall / tmp / build_80dea0f9774d7a9a5f8f33ee9c913bca remote:> webpack -p --config webpack.prod.config.js --progress
Here is my entire webpack.prod.config.js file:
var path = require('path'); var webpack = require('webpack'); var node_dir = path.resolve(__dirname, 'node_modules'); module.exports = { entry: [ 'unveil', path.resolve(__dirname, 'app/main.js') ], output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', publicPath: '/' }, module: { loaders: [ { test: /\.jsx?$/, include: path.join(__dirname, 'app'), loader: 'babel' }, { test: /\.scss$/, include: path.join(__dirname, 'app/styles'), loader: 'style!css!sass' }, { test: /\.(png|jpg)$/, loader: "file" }, { test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" }, { test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" } ] }, plugins: [ new webpack.NoErrorsPlugin(), new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery", "window.jQuery": "jquery", }), new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /(fr|en)$/), new webpack.DefinePlugin({ "process.env": { "NODE_ENV": JSON.stringify("production") } }), new webpack.optimize.UglifyJsPlugin({ minimize: true, compress: { warnings: false } }), ], resolve: { alias: { "unveil": "./app/statics/jquery.unveil.js", } }, };