Last active
February 2, 2020 17:58
-
-
Save DylanPiercey/8c26f2859a3c7d9ddb69f1af12e5b089 to your computer and use it in GitHub Desktop.
Options for the Marko Rollup server side plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import marko from "@marko/rollup"; | |
const commonPlugins = [...]; | |
export default { | |
input: "src/index.js", | |
plugins: [ | |
marko.server({ | |
browser: { | |
// before passing to rollup would add the Marko plugin in hydrate mode. | |
plugins: [ | |
...commonPlugins | |
] | |
} | |
}), | |
...commonPlugins | |
] | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import marko from "@marko/rollup"; | |
const commonPlugins = [...]; | |
export default { | |
input: "src/index.js", | |
plugins: [ | |
marko.server({ | |
browser: { | |
plugins: [ | |
marko.browser({ hydrate: true }), | |
...commonPlugins | |
] | |
} | |
}), | |
...commonPlugins | |
] | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import marko from "@marko/rollup"; | |
const commonPlugins = [...]; | |
export default { | |
input: "src/index.js", | |
plugins: [ | |
marko({ | |
output: "html", | |
// the below option is a rollup confg for the browser builds | |
// it would automatically set the `input` option, but could maybe infer more | |
// options from the server config? | |
browser: { | |
plugins: [ | |
// dom could be the default output type and so could ommitted below. | |
marko({ output: "dom", hydrate: true }), | |
...commonPlugins | |
] | |
} | |
}), | |
...commonPlugins | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment