mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-14 20:14:39 +00:00
add a --bundler option, for forcing rollup or webpack
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
import { build as _build } from '../api/build';
|
||||
import colors from 'kleur';
|
||||
import * as colors from 'kleur';
|
||||
import { locations } from '../config';
|
||||
import validate_bundler from './utils/validate_bundler';
|
||||
|
||||
export function build(opts: { bundler?: string }) {
|
||||
const bundler = validate_bundler(opts.bundler);
|
||||
|
||||
export function build() {
|
||||
return new Promise((fulfil, reject) => {
|
||||
try {
|
||||
const emitter = _build({
|
||||
dest: locations.dest(),
|
||||
app: locations.app(),
|
||||
routes: locations.routes(),
|
||||
bundler,
|
||||
webpack: 'webpack',
|
||||
rollup: 'rollup'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user