Last active
March 21, 2019 00:08
-
-
Save zxmarcos/8dd28370df93dbcabebcd873eb279015 to your computer and use it in GitHub Desktop.
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
/* | |
Bibliotecas utilizadas. | |
"devDependencies": { | |
"@babel/core": "^7.4.0", | |
"@babel/preset-env": "^7.4.1", | |
"@babel/preset-react": "^7.0.0", | |
"rollup": "^1.7.0", | |
"rollup-plugin-babel": "^4.3.2", | |
"rollup-plugin-commonjs": "^9.2.1", | |
"rollup-plugin-node-resolve": "^4.0.1", | |
"rollup-plugin-postcss": "^2.0.3", | |
"rollup-plugin-replace": "^2.1.1" | |
} | |
*/ | |
import babel from 'rollup-plugin-babel'; | |
import resolve from 'rollup-plugin-node-resolve'; | |
import replace from 'rollup-plugin-replace'; | |
import commonjs from 'rollup-plugin-commonjs'; | |
import postcss from 'rollup-plugin-postcss'; | |
export default { | |
input: "./src/lib/index.js", | |
output: { | |
file: './lib/bundle.js', | |
format: "iife", | |
name: 'bundle.js' | |
}, | |
plugins: [ | |
replace({ | |
'process.env.NODE_ENV': JSON.stringify( 'production' ) | |
}), | |
postcss({ | |
extract: true | |
}), | |
commonjs({ | |
include: "node_modules/**", | |
namedExports: { | |
'node_modules/react/index.js': ['Component', 'PureComponent', 'Fragment', 'Children', 'createElement'] | |
} | |
}), | |
babel({ | |
exclude: "node_modules/**" | |
}), | |
resolve({ | |
extensions: [ '.ejs', '.js', '.jsx', '.json'], | |
}), | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment