mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-14 03:54:46 +00:00
first stab at supporting Rollup (#130)
This commit is contained in:
44
src/rollup.ts
Normal file
44
src/rollup.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import { locations, dev } from './config';
|
||||
|
||||
export default {
|
||||
dev: dev(),
|
||||
|
||||
client: {
|
||||
input: () => {
|
||||
return `${locations.app()}/client.js`
|
||||
},
|
||||
|
||||
output: () => {
|
||||
return {
|
||||
dir: `${locations.dest()}/client`,
|
||||
format: 'esm'
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
server: {
|
||||
input: () => {
|
||||
return `${locations.app()}/server.js`
|
||||
},
|
||||
|
||||
output: () => {
|
||||
return {
|
||||
dir: locations.dest(),
|
||||
format: 'cjs'
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
serviceworker: {
|
||||
input: () => {
|
||||
return `${locations.app()}/service-worker.js`;
|
||||
},
|
||||
|
||||
output: () => {
|
||||
return {
|
||||
dir: locations.dest(),
|
||||
format: 'iife'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user