solo hashear en producción

This commit is contained in:
f 2021-05-08 16:37:37 -03:00
parent 0164ea245d
commit bbea4c3e6b
4 changed files with 6 additions and 2 deletions

1
_includes/pack.html Normal file
View file

@ -0,0 +1 @@
<script defer src="{{ jekyll.production | ternary: site.data.assets['assets/js/pack.js'], 'assets/js/pack.js' }}"></script>

View file

@ -18,7 +18,7 @@
{% endcomment %} {% endcomment %}
<link rel="preload" as="script" type="text/javascript" href="env.js" /> <link rel="preload" as="script" type="text/javascript" href="env.js" />
<script type="text/javascript" src="env.js"></script> <script type="text/javascript" src="env.js"></script>
<script defer type="text/javascript" src="{{ site.data.assets['assets/js/pack.js'] }}"></script> {% include_cached pack.html %}
{% comment %} {% comment %}
Agregar otras tipografías. Esto hace que las tipografías se carguen Agregar otras tipografías. Esto hace que las tipografías se carguen

View file

@ -9,7 +9,7 @@ module.exports = {
}, },
output: { output: {
path: __dirname, path: __dirname,
filename: '[name].[hash].js' filename: '[name].js'
}, },
mode: 'development', mode: 'development',
devtool: 'inline-source-map', devtool: 'inline-source-map',

View file

@ -5,6 +5,9 @@ const WebpackAssetsManifest = require('webpack-assets-manifest')
module.exports = merge.merge(common, { module.exports = merge.merge(common, {
mode: 'production', mode: 'production',
output: {
filename: '[name].[hash].js'
},
devtool: 'source-map', devtool: 'source-map',
plugins: [ plugins: [
new webpack.IgnorePlugin(/axe-core/), new webpack.IgnorePlugin(/axe-core/),