Skip to content

Commit

Permalink
Install/Setup HtmlWebpackPlugin and HtmlWebpackHarddiskPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
leonelgalan committed Mar 2, 2020
1 parent 0b5c8d9 commit a8fad1d
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 7 deletions.
15 changes: 15 additions & 0 deletions config/webpack/environment.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
const { environment } = require('@rails/webpacker')

const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin')

environment.plugins.append(
'html',
new HtmlWebpackPlugin({
alwaysWriteToDisk: true
})
)

environment.plugins.append(
'html-harddisk',
new HtmlWebpackHarddiskPlugin()
)

module.exports = environment
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"@babel/preset-react": "^7.8.3",
"@rails/webpacker": "4.2.2",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"html-webpack-harddisk-plugin": "^1.0.1",
"html-webpack-plugin": "^3.2.0",
"prop-types": "^15.7.2",
"react": "^16.13.0",
"react-dom": "^16.13.0"
Expand Down
Loading

0 comments on commit a8fad1d

Please sign in to comment.