2018-06-01 16:01:29 -04:00
|
|
|
import baseConfig from './rollup.config';
|
|
|
|
|
|
|
|
import alias from 'rollup-plugin-alias';
|
|
|
|
import filesize from 'rollup-plugin-filesize';
|
|
|
|
import livereload from 'rollup-plugin-livereload';
|
2018-06-06 17:01:39 -04:00
|
|
|
import replace from 'rollup-plugin-replace';
|
2018-06-01 16:01:29 -04:00
|
|
|
import serve from 'rollup-plugin-serve';
|
2018-06-01 16:57:36 -04:00
|
|
|
import visualizer from 'rollup-plugin-visualizer';
|
2018-06-01 16:01:29 -04:00
|
|
|
|
|
|
|
export default {
|
|
|
|
...baseConfig,
|
|
|
|
plugins: [
|
|
|
|
alias({
|
|
|
|
'inferno': `${__dirname}/node_modules/inferno/dist/index.dev.esm.js`,
|
|
|
|
}),
|
2018-06-06 17:01:39 -04:00
|
|
|
replace({
|
|
|
|
'process.env.NODE_ENV': "'development'",
|
|
|
|
}),
|
2018-06-01 16:01:29 -04:00
|
|
|
...baseConfig.plugins,
|
|
|
|
filesize(),
|
|
|
|
serve({
|
2019-01-11 16:32:52 -05:00
|
|
|
contentBase: ['build', 'public'],
|
2018-06-01 16:01:29 -04:00
|
|
|
host: 'localhost',
|
|
|
|
headers: {
|
|
|
|
'Access-Control-Allow-Origin': '*',
|
2019-01-11 16:32:52 -05:00
|
|
|
'Content-Security-Policy': "default-src 'none'; script-src 'self' localhost:35729 localhost:65432; connect-src 'self' ws://localhost:35729 ws://localhost:65432; img-src 'self' data://*; style-src 'self';",
|
2018-06-01 16:01:29 -04:00
|
|
|
},
|
|
|
|
historyApiFallback: true,
|
|
|
|
port: 3000,
|
|
|
|
}),
|
|
|
|
livereload(),
|
2018-06-01 16:57:36 -04:00
|
|
|
visualizer({
|
|
|
|
filename: './public/stats.html',
|
|
|
|
title: 'Film EXIF modules',
|
|
|
|
}),
|
2018-06-01 16:01:29 -04:00
|
|
|
],
|
|
|
|
};
|