diff --git a/package.json b/package.json index 5c95bc9e..857235ae 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "commitizen": "^2.9.6", "conventional-changelog-cli": "^1.3.22", "cz-conventional-changelog": "^2.1.0", + "dotenv": "^5.0.1", "enzyme": "^3.3.0", "enzyme-adapter-react-16": "^1.1.1", "eslint": "4.1.1", diff --git a/rollup.config.js b/rollup.config.js index 80947eaa..398d25df 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,8 +1,13 @@ import babel from 'rollup-plugin-babel'; import commonjs from 'rollup-plugin-commonjs'; import resolve from 'rollup-plugin-node-resolve'; +import dotenv from 'dotenv'; import pkg from './package.json'; +dotenv.config(); + +const { env } = process; + export default { input: 'src/index.js', external: ['react', 'react-dom'], @@ -19,7 +24,11 @@ export default { exclude: 'node_modules/**', plugins: ['external-helpers'], }), - resolve(), + resolve({ + customResolveOptions: { + moduleDirectory: env.NODE_PATH, + }, + }), commonjs({ include: 'node_modules/**', namedExports: {