{"_id":"@baselift/blocks-webpack-bundler","name":"@baselift/blocks-webpack-bundler","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.3":{"name":"@baselift/blocks-webpack-bundler","description":"Webpack bundler for @airtable/blocks-cli","version":"0.0.3","homepage":"https://airtable.com/developers/blocks","author":{"name":"Airtable"},"peerDependencies":{"@airtable/blocks-cli":"^2.0.0 || >=2.0.0-beta.5"},"dependencies":{"@airtable/blocks-cli":"2.0.4","@babel/core":"^7.12.13","@babel/preset-env":"^7.12.13","@babel/preset-react":"^7.12.13","@babel/preset-typescript":"^7.12.13","babel-loader":"^8.2.2","css-loader":"^6.3.0","style-loader":"^3.3.0","webpack":"^5.9.0","webpack-dev-server":"^3.11.0"},"devDependencies":{"@oclif/config":"^1.17.0","@oclif/test":"^1.2.7","@types/mocha":"^8.0.4","@types/node":"^18.19.33","@types/node-fetch":"^2.6.11","@types/webpack-dev-server":"^3.11.1","@typescript-eslint/eslint-plugin":"^7.13.0","@typescript-eslint/parser":"^7.13.0","eslint":"^9.5.0","eslint-plugin-import":"^2.29.1","mocha":"^5.2.0","chai":"^4.4.1","node-fetch":"^2.6.7","nyc":"^15.1.0","ts-node":"10.9.2","typescript":"^5.4.5"},"engines":{"node":">=10.0.0"},"license":"UNLICENSED","main":"dist/index.js","scripts":{"ci":"echo '--- webpack-bundler' && (cd ../cli-next && yarn build) && yarn test","lint":"ESLINT_USE_FLAT_CONFIG=false eslint . --ext .ts --config .eslintrc.js","pack:typescript":"rm -rf dist && rm -f tsconfig.tsbuildinfo && tsc","test":"yarn lint && yarn test:types && yarn test:unit","test:cov-report":"nyc --reporter=text --reporter=html --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","test:types":"tsc --project tsconfig-testing.json","test:unit":"nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"","release":"npm_config_registry=https://registry.npmjs.org/ release-it"},"types":"dist/index.d.ts","release-it":{"git":{"tagName":"@airtable/blocks-webpack-bundler@${version}","commitMessage":"Release @airtable/blocks-webpack-bundler@${version}"},"hooks":{"before:init":"../../bin/check-repo-for-release","after:release":"../../tools/git-mirror/bin/git-mirror sync @airtable/blocks-webpack-bundler@${version}"},"publishConfig":{"access":"public"}},"_id":"@baselift/blocks-webpack-bundler@0.0.3","gitHead":"5ebd8e0410b108ad31ecafb54193729b8d2c8ed1","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-bYJADZn7bpivntPUbSVbSAdRd8aa01ngpv0hmlwAd8EogyBMDrvdUD71DSNO/2FwYJfZva4wFKpnEg055TV9Ug==","shasum":"566f153f53ca4ba0ef2fd49bc8b6d2852e8ff5cf","tarball":"https://registry.npmjs.org/@baselift/blocks-webpack-bundler/-/blocks-webpack-bundler-0.0.3.tgz","fileCount":16,"unpackedSize":24824,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEO1jtXAQeWiVv12fyRHP5r6aE5JjPLsjCb61yjOXg0QAiEA3u68nMnZ4vLmUY2qakcX4j3tVhQGllSRx746Mhhdt6w="}]},"_npmUser":{"name":"jacobwilson","email":"jacobcharles96@gmail.com"},"directories":{},"maintainers":[{"name":"jacobwilson","email":"jacobcharles96@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blocks-webpack-bundler_0.0.3_1746509006562_0.7978807320343353"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-06T05:23:26.451Z","0.0.3":"2025-05-06T05:23:26.759Z","modified":"2025-05-06T05:23:27.009Z"},"maintainers":[{"name":"jacobwilson","email":"jacobcharles96@gmail.com"}],"description":"Webpack bundler for @airtable/blocks-cli","homepage":"https://airtable.com/developers/blocks","author":{"name":"Airtable"},"license":"UNLICENSED","readme":"# @airtable/blocks-webpack-bundler\n\nThis is a webpack bundler that can be used with @airtable/blocks-cli. This bundler allows you to\ncustomize the webpack config that is used when developing and bundling your Airtable app.\n\n## Installation\n\nInstall this package as a dependency of your Airtable app. Inside your app project folder, run\n\n```\nnpm install @airtable/blocks-webpack-bundler --save-dev\n```\n\n## Customization\n\n-   Create a file named `bundler.js` inside your app project folder with the following contents:\n\n```js\nconst createBundler = require('@airtable/blocks-webpack-bundler').default;\n\nfunction createConfig(baseConfig) {\n    // Add any desired customizations here\n    return baseConfig;\n}\n\nexports.default = () => {\n    return createBundler(createConfig);\n};\n```\n\n-   Inside your `block.json` file, add a \"bundler\" field, with a \"module\" field inside that points\n    to your bundler file.\n\n```diff\n{\n    \"version\": \"1.0\",\n-   \"frontendEntry\": \"./frontend/index.js\"\n+   \"frontendEntry\": \"./frontend/index.js\",\n+   \"bundler\": {\n+       \"module\": \"./bundler.js\"\n+   }\n}\n```\n\n## Example\n\nHere are some examples of how you can customize the webpack config via the `bundler.js` file.\n\nSupport Sass/SCSS files:\n\n```js\nconst createBundler = require('@airtable/blocks-webpack-bundler').default;\n\nfunction createConfig(baseConfig) {\n    baseConfig.module.rules.push({\n        test: /\\.s[ac]ss$/i,\n        use: [\n            // Make sure you have installed these loaders in your package.json as well!\n            // See https://webpack.js.org/loaders/sass-loader/ for more info\n            'style-loader',\n            'css-loader',\n            'sass-loader',\n        ],\n    });\n    return baseConfig;\n}\n\nexports.default = () => {\n    return createBundler(createConfig);\n};\n```\n\nSupport using [flow](https://flow.org/) to write your app:\n\n```js\nconst createBundler = require('@airtable/blocks-webpack-bundler').default;\n\nfunction createConfig(baseConfig) {\n    baseConfig.module.rules.push({\n        test: /\\.js$/,\n        exclude: [/node_modules/],\n        loader: 'babel-loader',\n        options: {\n            babelrc: false,\n            configFile: false,\n            presets: [\n                require.resolve('@babel/preset-env'),\n                require.resolve('@babel/preset-react'),\n                // Make sure you have installed this in your package.json by running\n                // `npm install @babel/preset-flow --save-dev`\n                require.resolve('@babel/preset-flow'),\n            ],\n        },\n    });\n    return baseConfig;\n}\n\nexports.default = () => {\n    return createBundler(createConfig);\n};\n```\n","readmeFilename":"README.md","_rev":"1-e7127326a94daf21f36d546a927525e1"}