Skip to content

Commit

Permalink
fix(build): fix absolute path in the rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
ej9x committed May 18, 2018
1 parent b500c9b commit 05a1dea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 10 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -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'],
Expand All @@ -19,7 +24,11 @@ export default {
exclude: 'node_modules/**',
plugins: ['external-helpers'],
}),
resolve(),
resolve({
customResolveOptions: {
moduleDirectory: env.NODE_PATH,
},
}),
commonjs({
include: 'node_modules/**',
namedExports: {
Expand Down

0 comments on commit 05a1dea

Please sign in to comment.