mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-02 07:47:32 +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 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.
|
||||
// Tell Webpack to provide empty mocks for them so importing them works.
|
||||
|
@ -1,4 +1,5 @@
|
||||
{% load seahub_tags i18n staticfiles %}
|
||||
{% load render_bundle from webpack_loader %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ LANGUAGE_CODE }}">
|
||||
@ -89,6 +90,7 @@
|
||||
};
|
||||
</script>
|
||||
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
||||
{% render_bundle 'commons' %}
|
||||
{% block extra_script %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -51,6 +51,8 @@
|
||||
}
|
||||
</script>
|
||||
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
||||
|
||||
{% render_bundle 'commons' %}
|
||||
{% render_bundle 'markdownEditor' 'js' %}
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user