faucet-pipeline-essugar
v0.0.5
Published
JavaScript + TypeScript asset pipeline based on sucrase
Downloads
8
Readme
faucet-pipeline-essugar
JavaScript + TypeScript asset pipeline based on sucrase
Usage
Drop-in replacement for faucet-pipeline-js. This is highly experimental, use at your own peril! (You have been warned.)
Example configuration:
module.exports = {
essugar: [{
source: "./src/index.tsx",
target: "./dist/bundle.js",
typescript: true,
jsx: true,
externals: {
"react": "React",
"react-dom": "ReactDOM"
}
}],
static: [{
source: "./src/index.html",
target: "./dist/index.html",
}, {
source: "react/umd/react.development.js",
target: "./dist/react.js",
}, {
source: "react-dom/umd/react-dom.development.js",
target: "./dist/react-dom.js",
}],
manifest: {
webRoot: "./dist",
},
watchDirs: [
"./src"
],
plugins: [require("faucet-pipeline-essugar")]
}
Implementation
Heavily copied from faucet-pipeline-js.
Supports similar options (typescript
and jsx
).
Uses Sucrase under the hood; that is, TypeScript is not type-checked.
Use tsc
for type-checking.