rollup-faq
peer-dependencies
import answer from 'the-answer';
import _ from 'lodash'// rollup.config.js
import resolve from "rollup-plugin-node-resolve";
export default {
input: "src/main.js",
output: {
file: "bundle.js",
format: "cjs"
},
plugins: [
resolve({
// pass custom options to the resolve plugin
customResolveOptions: {
moduleDirectory: "node_modules"
}
})
],
// 어떤 모듈이 external로 처리되야 하는지 선언
external: ["lodash"]
};rollup 명령어
plugins
rollup-plugin-peer-deps-external
rollup-plugin-babel, rollup-plugin-node-resolve
babel의 external-helper 옵션
Last updated
Was this helpful?