Skip to content

Commit

Permalink
[update] fix bug on dev and umd
Browse files Browse the repository at this point in the history
what:
why:
how:
  • Loading branch information
toxic-johann committed Aug 8, 2017
1 parent bd83f2e commit e504aaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build/rollup.config.dev.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import base from './rollup.config.base';
import serve from 'rollup-plugin-serve';
import livereload from 'rollup-plugin-livereload';
import replace from 'rollup-plugin-replace';
import {camelize} from 'toxic-utils';
const {name} = require('../package.json');
const config = base('iife');
config.plugins.push(
serve(),
livereload()
);
config.plugins.unshift(replace({
'process.env.NODE_ENV': '"development"'
}));
export default Object.assign(config, {
format: 'umd',
dest: 'lib/index.dev.js',
Expand Down
7 changes: 6 additions & 1 deletion build/rollup.config.umd.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import base from './rollup.config.base';
const {name} = require('../package.json');
import {camelize} from 'toxic-utils';
export default Object.assign(base('umd'), {
import replace from 'rollup-plugin-replace';
const config = base('umd');
config.plugins.unshift(replace({
'process.env.NODE_ENV': '"development"'
}));
export default Object.assign(config, {
format: 'umd',
dest: 'lib/index.browser.js',
moduleName: camelize(name, true)
Expand Down

0 comments on commit e504aaa

Please sign in to comment.