mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(slides): swiper is not required as dependency
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run clean && npm run build.css && stencil build --docs",
|
||||
"build.vendor": "rollup --config ./scripts/swiper.rollup.config.js",
|
||||
"build.css": "npm run css.sass && npm run css.minify",
|
||||
"build.debug": "npm run clean && stencil build --debug",
|
||||
"build.docs.json": "stencil build --docs-json dist/docs.json",
|
||||
|
||||
14
core/scripts/swiper.rollup.config.js
Normal file
14
core/scripts/swiper.rollup.config.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
input: 'src/components/slides/swiper/swiper.js',
|
||||
output: {
|
||||
file: 'src/components/slides/swiper/swiper.bundle.js',
|
||||
format: 'es'
|
||||
},
|
||||
plugins: [
|
||||
resolve({
|
||||
module: true
|
||||
})
|
||||
]
|
||||
};
|
||||
@@ -287,7 +287,8 @@ export class Slides implements ComponentInterface {
|
||||
const finalOptions = this.normalizeOptions();
|
||||
|
||||
// init swiper core
|
||||
const { Swiper } = await import('./swiper/swiper');
|
||||
// @ts-ignore
|
||||
const { Swiper } = await import('./swiper/swiper.bundle.js');
|
||||
const swiper = new Swiper(this.el, finalOptions);
|
||||
this.didInit = true;
|
||||
this.readySwiper(swiper);
|
||||
|
||||
4922
core/src/components/slides/swiper/swiper.bundle.js
Normal file
4922
core/src/components/slides/swiper/swiper.bundle.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user