|
|
|
@ -1,6 +1,7 @@ |
|
|
|
import svelte from "rollup-plugin-svelte" |
|
|
|
import postcss from "rollup-plugin-postcss" |
|
|
|
import resolve from "rollup-plugin-node-resolve" |
|
|
|
import commonjs from "rollup-plugin-commonjs" |
|
|
|
|
|
|
|
const postcssOptions = () => ({ |
|
|
|
extensions: [".scss", ".sass"], |
|
|
|
@ -16,6 +17,10 @@ const postcssOptions = () => ({ |
|
|
|
], |
|
|
|
}) |
|
|
|
|
|
|
|
const coreExternal = [ |
|
|
|
"shortid", |
|
|
|
] |
|
|
|
|
|
|
|
export default { |
|
|
|
input: "src/index.js", |
|
|
|
output: [ |
|
|
|
@ -30,7 +35,18 @@ export default { |
|
|
|
svelte({ |
|
|
|
hydratable: true, |
|
|
|
}), |
|
|
|
resolve(), |
|
|
|
resolve({ |
|
|
|
preferBuiltins: true, |
|
|
|
browser: true, |
|
|
|
dedupe: importee => { |
|
|
|
return coreExternal.includes(importee) |
|
|
|
}, |
|
|
|
}), |
|
|
|
commonjs({ |
|
|
|
namedExports: { |
|
|
|
shortid: ["generate"], |
|
|
|
}, |
|
|
|
}), |
|
|
|
postcss(postcssOptions()), |
|
|
|
], |
|
|
|
} |
|
|
|
|