Skip to content

Commit 61218e3

Browse files
Add Ionic 5 support fixes #108 (#109)
* Add Ionic 5 support fixes #108 * Add readme
1 parent 6309815 commit 61218e3

File tree

12 files changed

+4485
-4161
lines changed

12 files changed

+4485
-4161
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Apart from minor improvements and further testing of various mixes of Ionic comp
4444
| Import controllers directly | :heavy_check_mark: | [Pending](https://github.com/ionic-team/ionic/pull/19573) | Improve treeshaking and sync with react and angular implementations |
4545
| Unit tests | :x: | :x: | Outdated as were originally written in plain JS, need to be updated for TS |
4646

47+
## Ionic versions 4 and 5
48+
:warning: Moving forward all versions of `ionic-vue` will be supporting Ionic 5 only, if you'd like to continue using Ionic 4 please use `ionic-vue` version `1.3.4`
49+
4750
## Installing / Getting started
4851

4952
A quick introduction of the minimal setup you need to get a hello world up and running.
@@ -93,7 +96,6 @@ IonicVueRouter requires `ion-vue-router` element in order to render Ionic transi
9396
### IonicVue
9497

9598
`IonicVue` abstracts DOM interaction of Ionic UI components inside a Vue application.
96-
:warning: Use of `this.$ionic` or `Vue.$ionic` is deprecated and will be removed in the near future. Please use the example below instead:
9799

98100
```js
99101
import { alertController } from '@ionic/vue';

build/rollup.config.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
import path from 'path'
2-
import vue from 'rollup-plugin-vue'
3-
import { terser } from 'rollup-plugin-terser'
4-
import typescript from 'rollup-plugin-typescript2'
5-
import { version as packageVersion } from '../package.json'
1+
import path from "path";
2+
import vue from "rollup-plugin-vue";
3+
import { terser } from "rollup-plugin-terser";
4+
import typescript from "rollup-plugin-typescript2";
5+
import { version as packageVersion } from "../package.json";
66

7-
const resolve = _path => path.resolve(__dirname, '../', _path)
8-
const version = process.env.VERSION || packageVersion
7+
const resolve = _path => path.resolve(__dirname, "../", _path);
8+
const version = process.env.VERSION || packageVersion;
99
const banner = `/*!
1010
* @modus/ionic-vue v${version}
1111
* ${new Date().getFullYear()} Michael Tintiuc - Modus Create
1212
* @license MIT
1313
*/
14-
`
14+
`;
1515

1616
function outputConfig(suffix, format, opts = {}) {
1717
return Object.assign(
1818
{
1919
file: resolve(`./dist/ionic-vue${suffix}.js`),
20-
name: 'IonicVue',
21-
exports: 'named',
20+
name: "IonicVue",
21+
exports: "named",
2222
sourcemap: true,
2323
format,
24-
banner,
24+
banner
2525
},
2626
opts
27-
)
27+
);
2828
}
2929

3030
function baseConfig() {
3131
return {
32-
input: resolve('./src/index.ts'),
32+
input: resolve("./src/index.ts"),
3333
output: [
34-
outputConfig('', 'umd', {
34+
outputConfig("", "umd", {
3535
globals: {
36-
vue: 'Vue',
37-
},
36+
vue: "Vue"
37+
}
3838
}),
39-
outputConfig('.esm', 'esm'),
40-
outputConfig('.common', 'cjs'),
39+
outputConfig(".esm", "esm"),
40+
outputConfig(".common", "cjs")
4141
],
4242
external: [
43-
'vue',
44-
'vue-router',
45-
'@ionic/core',
46-
'@ionic/core/loader',
47-
'ionicons',
48-
'ionicons/icons',
43+
"vue",
44+
"vue-router",
45+
"@ionic/core",
46+
"@ionic/core/loader",
47+
"ionicons",
48+
"ionicons/icons"
4949
],
5050
plugins: [
5151
vue(),
5252
typescript({
5353
useTsconfigDeclarationDir: true,
54-
objectHashIgnoreUnknownHack: true,
54+
objectHashIgnoreUnknownHack: false,
5555
clean: true
5656
})
57-
],
58-
}
57+
]
58+
};
5959
}
6060

6161
export default args => {
62-
const configs = [baseConfig()]
62+
const configs = [baseConfig()];
6363

6464
if (args.configProd === true) {
65-
const prodConfig = baseConfig()
66-
prodConfig.plugins.push(terser())
65+
const prodConfig = baseConfig();
66+
prodConfig.plugins.push(terser());
6767

6868
for (const item of prodConfig.output) {
69-
item.file = item.file.replace('.js', '.min.js')
70-
item.sourcemap = false
69+
item.file = item.file.replace(".js", ".min.js");
70+
item.sourcemap = false;
7171
}
7272

73-
configs.push(prodConfig)
73+
configs.push(prodConfig);
7474
}
7575

76-
return configs
77-
}
76+
return configs;
77+
};

0 commit comments

Comments
 (0)