Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stable-module-id-hash webpack plugin #559

Merged
merged 3 commits into from
Nov 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ExtractTextPlugin from 'extract-text-webpack-plugin'
import StaticSiteGeneratorPlugin from 'static-site-generator-webpack-plugin'
import { StatsWriterPlugin } from 'webpack-stats-plugin'
//import HardSourceWebpackPlugin from 'hard-source-webpack-plugin'
//import WebpackStableModuleIdAndHash from 'webpack-stable-module-id-and-hash'

import webpackModifyValidate from './webpack-modify-validate'

Expand Down Expand Up @@ -239,6 +240,8 @@ module.exports = (program, directory, suppliedStage, webpackPort = 1500, pages =
}),
// Ensure module order stays the same. Supposibly fixed in webpack 2.0.
new webpack.optimize.OccurenceOrderPlugin(),
//new WebpackStableModuleIdAndHash({ seed: 9, hashSize: 47 }),
new webpack.NamedModulesPlugin(),
// Enable the offline plugin to add a service worker.
new OfflinePlugin({
AppCache: false,
Expand Down Expand Up @@ -496,7 +499,6 @@ module.exports = (program, directory, suppliedStage, webpackPort = 1500, pages =
resolveLoader: resolveLoader(),
plugins: plugins(),
resolve: resolve(),
recordsPath: `${process.cwd()}/.webpack-records/records-${stage}.json`,
})

return webpackModifyValidate(module, config, stage)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"webpack-dev-server": "^1.16.1",
"webpack-md5-hash": "0.0.5",
"webpack-require": "0.0.16",
"webpack-stable-module-id-and-hash": "^1.0.2",
"webpack-stats-plugin": "^0.1.4",
"webpack-validator": "^2.2.7",
"yaml-js": "^0.1.4"
Expand Down
6 changes: 4 additions & 2 deletions scripts/publish-site.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
echo "=== Installing npm packages for Gatsby"
npm install
echo "=== Building ES5 version of Gatsby"
npm run build
cd www
echo "=== Installing the website dependencies"
npm install
ls ./node_modules | grep stable
echo "=== Overwrite website node_modules with Gatsby's."
cp -r ../node_modules/* ./node_modules/
ls ./node_modules | grep stable
echo "=== Copying built Gatsby to website."
cp -r ../dist ./node_modules/gatsby/
echo "=== Building website"
Expand Down
Loading