Created
August 23, 2018 06:37
-
-
Save baorv/a29df7b8ad276fcff00906ec29fd2add to your computer and use it in GitHub Desktop.
Rollup configuration for development
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
| import babel from "rollup-plugin-babel"; | |
| import cjs from "rollup-plugin-commonjs"; | |
| import globals from "rollup-plugin-node-globals"; | |
| import replace from "rollup-plugin-replace"; | |
| import resolve from "rollup-plugin-node-resolve"; | |
| import serve from "rollup-plugin-serve"; | |
| import postcss from "rollup-plugin-postcss"; | |
| export default { | |
| input: "examples/src/app.js", | |
| output: { | |
| file: "examples/public/js/app.js", | |
| format: "iife", | |
| sourcemap: true | |
| }, | |
| plugins: [ | |
| postcss({ | |
| modules: false, | |
| extract: "dist/polaris.css", | |
| inject: false, | |
| extensions: [".css"], | |
| sourceMap: "inline" | |
| }), | |
| babel({ | |
| babelrc: false, | |
| exclude: "node_modules/**", | |
| presets: [ [ "es2015", { modules: false } ], "stage-0", "react" ], | |
| plugins: [ "external-helpers" ] | |
| }), | |
| cjs({ | |
| exclude: "node_modules/process-es6/**", | |
| include: [ | |
| "node_modules/create-react-class/**", | |
| "node_modules/fbjs/**", | |
| "node_modules/object-assign/**", | |
| "node_modules/react/**", | |
| "node_modules/react-dom/**", | |
| "node_modules/prop-types/**" | |
| ] | |
| }), | |
| globals(), | |
| replace({ "process.env.NODE_ENV": JSON.stringify("development") }), | |
| resolve({ | |
| browser: true, | |
| main: true | |
| }), | |
| serve({ | |
| contentBase: "examples/public", | |
| port: 9000, | |
| open: true | |
| }), | |
| ] | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment