create-vue 3.0.0-beta.1 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -192,7 +192,11 @@ async function init() {
192
192
  const pkg = { name: packageName, version: '0.0.0' }
193
193
  fs.writeFileSync(path.resolve(root, 'package.json'), JSON.stringify(pkg, null, 2))
194
194
 
195
- const templateRoot = new URL('./template', import.meta.url).pathname
195
+ // todo:
196
+ // work around the esbuild issue that `import.meta.url` cannot be correctly transpiled
197
+ // when bundling for node and the format is cjs
198
+ // const templateRoot = new URL('./template', import.meta.url).pathname
199
+ const templateRoot = path.resolve(__dirname, 'template')
196
200
  const render = function render(templateName) {
197
201
  const templateDir = path.resolve(templateRoot, templateName)
198
202
  renderTemplate(templateDir, root)