Skip to content

Commit

Permalink
fix playground amp-script hash generation (#5888)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkettner authored May 20, 2021
1 parent 5a423dd commit eef678f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@ampproject/toolbox-optimizer": "2.8.0-canary.20",
"@google-cloud/datastore": "6.4.0",
"acorn": "8.2.4",
"buffer": "5.6.0",
"casual": "1.6.2",
"cheerio": "1.0.0-rc.3",
"client-sessions": "0.8.0",
Expand Down
9 changes: 7 additions & 2 deletions playground/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ module.exports = (env, argv) => {
},
devtool: devMode ? 'inline-source-map' : false,
resolve: {
alias: {
crypto: 'crypto-browserify',
},
fallback: {
crypto: require.resolve('crypto-es'),
util: require.resolve('util/util.js'),
stream: require.resolve('stream-browserify'),
process: require.resolve('process/browser.js'),
},
},
optimization: {
Expand Down Expand Up @@ -73,6 +74,10 @@ module.exports = (env, argv) => {
'process.version': JSON.stringify(process.version),
global: '(typeof globalThis ? globalThis : self)',
}),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: ['process'],
}),
new CopyWebpackPlugin({
patterns: [{from: path.join(__dirname, 'static/')}],
}),
Expand Down

0 comments on commit eef678f

Please sign in to comment.