Created
December 22, 2020 21:53
-
-
Save volkanunsal/384bd724f0e5d11bf0c47e4b89e2679f to your computer and use it in GitHub Desktop.
This file contains 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
const typescript = require('@rollup/plugin-typescript'); | |
const { nodeResolve } = require('@rollup/plugin-node-resolve'); | |
const commonjs = require('@rollup/plugin-commonjs'); | |
const json = require('@rollup/plugin-json'); | |
const serve = require('rollup-plugin-serve'); | |
const livereload = require('rollup-plugin-livereload'); | |
const replace = require('@rollup/plugin-replace'); | |
module.exports = { | |
input: 'src/index.tsx', | |
output: { | |
file: 'public/bundle.js', | |
format: 'es', | |
}, | |
watch: { | |
skipWrite: false, | |
clearScreen: false, | |
include: 'src/**/*', | |
}, | |
plugins: [ | |
serve('public'), | |
livereload({ | |
watch: 'public', | |
}), | |
replace({ | |
'process.env.NODE_ENV': JSON.stringify('production'), | |
}), | |
nodeResolve(), | |
typescript(), | |
json(), | |
commonjs(), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment