Open sneko opened 4 years ago
You could do the same in vue.config.js E.g for IgnorePlugin
const webpack = require("webpack");
module.exports = {
publicPath: "/",
configureWebpack: {
plugins: [new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)]
}
};
Hi @brockpetrie,
There are several ways to not include all locales in the final build bundle with
moment.js
as described here: https://github.com/jmblog/how-to-optimize-momentjs-with-webpack (Note that tree-shaking is still not planned formoment.js
😢 )But I don't know how to manage that since
vue-moment
is the intermediary.Any idea?
Thank you,
EDIT: I tried using https://github.com/moment/moment/issues/2517#issuecomment-620674018 but the size has not changed at all. A bit weird ^^... maybe because of the VueMoment intermediary?