1- create on root project one folder "scripts" 2- create inside this folder one js file "custom.lib.js" 3- export a modules inside this file. 4- first 5 elements are ionic config (copy and paste) 5- then add wherever lib you want include on ionic (i left you one example for font-awesome lib). 6- override "ionic_copy" config on package.json, create one session inside package.json call. "config": { "ionic_copy": "./scripts/custom.lib.js" },
Created
April 25, 2018 03:35
-
-
Save vanessasoutoc/59befaf65118852759359e0efc341294 to your computer and use it in GitHub Desktop.
Add Css And JS to ionic v2 v3 with script webpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
copyAssets: { | |
src: ['{{SRC}}/assets/**/*'], | |
dest: '{{WWW}}/assets' | |
}, | |
copyIndexContent: { | |
src: ['{{SRC}}/index.html', '{{SRC}}/manifest.json', '{{SRC}}/service-worker.js'], | |
dest: '{{WWW}}' | |
}, | |
copyFonts: { | |
src: ['{{ROOT}}/node_modules/ionicons/dist/fonts/**/*', '{{ROOT}}/node_modules/ionic-angular/fonts/**/*'], | |
dest: '{{WWW}}/assets/fonts' | |
}, | |
copyPolyfills: { | |
src: ['{{ROOT}}/node_modules/ionic-angular/polyfills/polyfills.js'], | |
dest: '{{BUILD}}' | |
}, | |
copySwToolbox: { | |
src: ['{{ROOT}}/node_modules/sw-toolbox/sw-toolbox.js'], | |
dest: '{{BUILD}}' | |
}, | |
copyFontAwesomeCSS: { | |
src: '{{ROOT}}/node_modules/font-awesome/css/font-awesome.min.css', | |
dest: '{{WWW}}/assets/css/' | |
}, | |
copyFontAwesome: { | |
src: '{{ROOT}}/node_modules/font-awesome/fonts/**/*', | |
dest: '{{WWW}}/assets/fonts/' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment