UNPKG

496 BJavaScriptView Raw
1const nonStandardPlugins = require('./non-standard-plugins');
2
3module.exports = function shopifyNodePreset(context, options = {}) {
4 const {
5 version = 'current',
6 modules = 'commonjs',
7 } = options;
8
9 return {
10 presets: [
11 [require.resolve('@babel/preset-env'), {
12 modules,
13 useBuiltIns: true,
14 targets: {
15 node: version,
16 },
17 }],
18 require.resolve('@babel/preset-stage-3'),
19 ],
20 plugins: nonStandardPlugins(options),
21 };
22};