mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-22 08:47:22 +00:00
update config
This commit is contained in:
parent
895124495c
commit
2dd772d72b
@ -365,6 +365,18 @@ module.exports = {
|
|||||||
//new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
//new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
|
||||||
|
|
||||||
new BundleTracker({filename: './webpack-stats.pro.json'}),
|
new BundleTracker({filename: './webpack-stats.pro.json'}),
|
||||||
|
|
||||||
|
// https://webpack.js.org/plugins/commons-chunk-plugin/
|
||||||
|
new webpack.optimize.CommonsChunkPlugin({
|
||||||
|
name: 'commons',
|
||||||
|
filename: '[name]/bundle.common.js',
|
||||||
|
minChunks: function(module) {
|
||||||
|
if(module.resource && (/^.*\.(css|scss)$/).test(module.resource)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return module.context && module.context.includes('node_modules');
|
||||||
|
}
|
||||||
|
})
|
||||||
],
|
],
|
||||||
// Some libraries import Node modules but don't use them in the browser.
|
// Some libraries import Node modules but don't use them in the browser.
|
||||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{% load seahub_tags i18n staticfiles %}
|
{% load seahub_tags i18n staticfiles %}
|
||||||
|
{% load render_bundle from webpack_loader %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ LANGUAGE_CODE }}">
|
<html lang="{{ LANGUAGE_CODE }}">
|
||||||
@ -89,6 +90,7 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
||||||
|
{% render_bundle 'commons' %}
|
||||||
{% block extra_script %}{% endblock %}
|
{% block extra_script %}{% endblock %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -51,6 +51,8 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
||||||
|
|
||||||
|
{% render_bundle 'commons' %}
|
||||||
{% render_bundle 'markdownEditor' 'js' %}
|
{% render_bundle 'markdownEditor' 'js' %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user