-
Discussed in #5435Originally posted by stratboy February 8, 2022 import Swiper, { Navigation, Pagination } from 'swiper';
console.log(Swiper); And this is my webpack config: const path = require('path');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
module.exports = {
//mode: 'development',
mode: 'production',
watch: true,
entry: {
index: './src/index.js',
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
plugins: [
new BundleAnalyzerPlugin()
],
module: {
rules: [
{
test: /\.m?js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: { presets: ['@babel/preset-env'] }
}
} // babel
] // rules
} // module
}; Well, the BundleAnalyzer graph shows that ALL the swiper modules are bundled. Why? How can I avoid that? |
Beta Was this translation helpful? Give feedback.
Answered by
oguilleux
Mar 13, 2022
Replies: 2 comments
-
I think this question is better to address to webpack |
Beta Was this translation helpful? Give feedback.
0 replies
-
Solved here |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
oguilleux
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved here