ivi-vars
v0.1.1
Published
Environment Variables for ivi library
Downloads
6
Readme
Environment Variable presets for ivi library.
By default, ivi-vars is pointing at config file that targets browser environment in a development mode.
browser-dev.jstargets browser in a development mode (DEFAULT).browser.jstargets browser in a production mode.cordova-dev.jstargets cordova in a development mode.cordova.jstargets cordova in a production mode.electron-dev.jstargets electron in a development mode.electron.jstargets electron in a production mode.evergreen-browser-dev.jstargets latest browser in a development mode.evergreen-browser.jstargets latest browser in a production mode.node-dev.jstargets Node.js in a development mode.node.jstargets Node.js in a production mode.
Webpack Configuration
Configure webpack package aliasing with resolve-alias.
// webpack.config.js
module.exports = {
resolve: {
alias: {
"ivi-vars": "ivi-vars/browser",
},
},
};Rollup Configuration
Install rollup-plugin-alias module.
npm install --save-dev rollup-plugin-aliasAnd enable it in the rollup config:
import { rollup } from "rollup";
import alias from "rollup-plugin-alias";
rollup({
entry: "main.js",
plugins: [
alias({
"ivi-vars": __dirname + "/node_modules/ivi-vars/browser",
}),
],
}).then(...);