mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 12:15:40 +08:00
ea6f42c256
* feat: speed up build process, upgrade majority of dependencies * feat: allow specifying max cores * chore: add some comments
28 lines
661 B
JavaScript
28 lines
661 B
JavaScript
/**
|
|
* This is a project wide babel configuration.
|
|
* https://babeljs.io/docs/en/config-files#project-wide-configuration
|
|
*
|
|
* We use this file to apply babel configuration to packages in `node_modules`
|
|
*/
|
|
|
|
const lodashOptimizations =
|
|
process.env.WEBPACK === "true" ? ["use-lodash-es", "lodash"] : [];
|
|
|
|
module.exports = {
|
|
env: {
|
|
production: {
|
|
plugins: [...lodashOptimizations],
|
|
},
|
|
development: {
|
|
plugins: [...lodashOptimizations],
|
|
},
|
|
test: {
|
|
presets: [
|
|
["@babel/env", { targets: "last 2 versions", modules: "commonjs" }],
|
|
"@babel/react",
|
|
],
|
|
plugins: ["dynamic-import-node"],
|
|
},
|
|
},
|
|
};
|