We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// rollup.config.js import commonjs from 'rollup-plugin-commonjs'; import nodeResolve from 'rollup-plugin-node-resolve'; import babel from 'rollup-plugin-babel'; import Replace from 'rollup-plugin-replace'; import serve from 'rollup-plugin-serve' import livereload from 'rollup-plugin-livereload' import uglify from 'rollup-plugin-uglify'; import html from 'rollup-plugin-fill-html'; const isProduction = process.env.NODE_ENV === 'production' function setConfig (options) { const config = { input: options.input, output: { file: isProduction ? options.output.minifyFilename : options.output.filename, format: 'iife', sourcemap: isProduction ? false : 'inline' }, plugins: [ babel({ exclude: 'node_modules/**' // only transpile our source code }), nodeResolve(), commonjs({ namedExports: { 'node_modules/react/index.js': ['Children', 'Component', 'createElement'] } }), Replace({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) }), html({ template: options.html.template, filename: options.html.filename }) // browsersync({server: 'home'}) ] } if (isProduction) { config.plugins = config.plugins.concat([ // hash({ // dest: options.output.minifyFilename // }), uglify({ compress: { warnings: false, drop_console: true }, output: { comments: false } }) ]) } else { // config.plugins = config.plugins.concat([ // serve({ // open: true, // historyApiFallback: true, // contentBase: ['./dist'], // port: 8080, // }), // livereload() // ]) } return config } const configs = [ setConfig({ input: './src/auth/main.js', output: { minifyFilename: './dist/auth/index.min.[hash].js', filename: './dist/auth/index.js' }, html: { template: './src/auth/index.html', filename: 'auth/index.html', } }), setConfig({ input: './src/home/main.js', output: { minifyFilename: './dist/home/index.min.[hash].js', filename: './dist/home/index.js' }, html: { template: './src/home/index.html', filename: 'home/index.html', } }) ] export default configs
I got this in auth/index.html
and i got this in home/index.html
By the way, the path is not my expectation
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I got this in auth/index.html
![image](https://user-images.githubusercontent.com/14030995/33814983-081ce5d8-de69-11e7-97fa-f91433530436.png)
and i got this in home/index.html
![image](https://user-images.githubusercontent.com/14030995/33814998-2856ef1a-de69-11e7-805f-20403192cd22.png)
By the way, the path is not my expectation
![image](https://user-images.githubusercontent.com/14030995/33815049-83c90bc6-de69-11e7-9a5c-6b5fa6756f1b.png)
The text was updated successfully, but these errors were encountered: