Skip to content

Commit

Permalink
ensure bundle resolves correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Sep 1, 2021
1 parent 93ee5e6 commit d889b44
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/next/taskfile.js
@@ -1,7 +1,8 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const fs = require('fs')
const notifier = require('node-notifier')
// eslint-disable-next-line import/no-extraneous-dependencies
const { relative, basename, resolve } = require('path')
const { relative, basename, resolve, join } = require('path')
const { Module } = require('module')

// Note:
Expand Down Expand Up @@ -159,6 +160,11 @@ export async function ncc_babel_bundle_packages(task, opts) {
})
.target(`compiled/babel-packages`)

await fs.promises.writeFile(
join(__dirname, 'dist/compiled/babel-packages/package.json'),
JSON.stringify({ name: 'babel-packages', main: './packages-bundle.js' })
)

await task
.source(opts.src || 'bundles/babel/packages/*')
.target('compiled/babel')
Expand Down

0 comments on commit d889b44

Please sign in to comment.