Skip to content

Commit 24caaad

Browse files
authored
fix(build): add old ionicons.js file (#982)
1 parent 8c2a507 commit 24caaad

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

scripts/collection-copy.ts

+12
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ async function collectionCopy(rootDir: string) {
2626
private: true,
2727
};
2828
await fs.writeFile(cePackageJsonPath, JSON.stringify(cePackageJson, null, 2));
29+
30+
/**
31+
* TODO: Remove this in Ionicons v6.0
32+
* Stencil 2 removed the legacy loader,
33+
* but that is what Ionicons users were using
34+
* to load Ionicons from a CDN. The lines
35+
* below will add in a legacy loader for users
36+
* to use so there is no breaking change in usage.
37+
*/
38+
const installLoaderSrc = join(rootDir, 'scripts', 'install-loader.js');
39+
const installLoaderDest = join(rootDir, 'dist', 'ionicons.js');
40+
await fs.copyFile(installLoaderSrc, installLoaderDest)
2941

3042
// this is temporary!!!!
3143
// removing the `type` from the d.ts export

stencil.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Config } from '@stencil/core';
22

33
export const config: Config = {
44
namespace: 'ionicons',
5+
buildEs5: 'prod',
56
outputTargets: [
67
{
78
type: 'dist',

0 commit comments

Comments
 (0)