tiny-engine icon indicating copy to clipboard operation
tiny-engine copied to clipboard

🐛 [Bug]: @opentiny/tiny-engine-controller 打包报错

Open ArtisanQ opened this issue 1 year ago • 6 comments

Environment

windwos11

Version

16

Version

最新

Link to minimal reproduction

image

Step to reproduce

RollupError: Invalid pattern "./js/completion.js" for "output.entryFileNames", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.

What is expected

No response

What is actually happening

No response

What is your project name

1

Any additional comments (optional)

No response

ArtisanQ avatar May 07 '24 07:05 ArtisanQ

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: @opentiny/tiny-engine-controller packaging error

Issues-translate-bot avatar May 07 '24 07:05 Issues-translate-bot

develop 分支代码无法复现,麻烦提供详细复现步骤 @ArtisanQ

chilingling avatar May 07 '24 08:05 chilingling

Bot detected the issue body's language is not English, translate it automatically.


The develop branch code cannot be reproduced, please provide detailed reproduction steps. @ArtisanQ

Issues-translate-bot avatar May 07 '24 08:05 Issues-translate-bot

执行pnpm build:plugin(controller 打包)就会报错, 目前的解决方案: const jsEntries = glob.sync('./js/**/*.js').map((file) => { return [file.slice(5, file.length - path.extname(file).length), fileURLToPath(new URL(file, import.meta.url))] })

  fileName: (format, entryName) => {
    if (entryName in Object.fromEntries(jsEntries)) {
      return `js/${entryName}.js`;  // 动态入口放在 js/ 子目录
    }
    return `${entryName}.js`;  // 静态入口放在根目录
  },

应该是./js/xxx.js 无法识别路径

ArtisanQ avatar May 07 '24 08:05 ArtisanQ

Bot detected the issue body's language is not English, translate it automatically.


Executing pnpm build:plugin (controller packaging) will report an error. Current solution: const jsEntries = glob.sync('./js/**/*.js').map((file) => { return [file.slice(5, file.length - path.extname(file).length), fileURLToPath(new URL(file, import.meta.url))] })

  fileName: (format, entryName) => {
    if (entryName in Object.fromEntries(jsEntries)) {
      return `js/${entryName}.js`; // The dynamic entry is placed in the js/ subdirectory
    }
    return `${entryName}.js`; // Static entry is placed in the root directory
  },

It should be ./js/xxx.js. The path cannot be recognized.

Issues-translate-bot avatar May 07 '24 08:05 Issues-translate-bot

image

我这边还是没法复现 @ArtisanQ

chilingling avatar May 07 '24 09:05 chilingling

close issue due to lack of response.

chilingling avatar May 25 '24 07:05 chilingling