laravel 如何更改 ember-cli 中的 dist 文件夹路径?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24742260/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 09:48:46  来源:igfitidea点击:

How do I change the dist-folder path in ember-cli?

ember.jslaravelember-cli

提问by Constantin

I would like to use ember-cli with Laravel and I need to know how I can change the path of the dist folder.

我想在 Laravel 中使用 ember-cli,我需要知道如何更改 dist 文件夹的路径。

采纳答案by Jordy Langen

Use the output path option when using ember build:

使用时使用输出路径选项ember build

ember build --output-path=/not-dist

回答by Johnny Oshika

You can configure the output path by editing the .ember-cli file, which is located at the root of your project.

您可以通过编辑位于项目根目录的 .ember-cli 文件来配置输出路径。

{
  "output-path": "my-output-folder/"
}

By default, this value is "dist/" for both 'build' and 'serve' commands, as you can see in the source code here:

默认情况下,“build”和“serve”命令的这个值都是“dist/”,你可以在这里的源代码中看到:

https://github.com/stefanpenner/ember-cli/blob/0b7dcf3a0cdb35114643b076c91afda79efda6fc/lib/commands/build.js

https://github.com/stefanpenner/ember-cli/blob/0b7dcf3a0cdb35114643b076c91afda79efda6fc/lib/commands/build.js

https://github.com/stefanpenner/ember-cli/blob/0b7dcf3a0cdb35114643b076c91afda79efda6fc/lib/commands/serve.js

https://github.com/stefanpenner/ember-cli/blob/0b7dcf3a0cdb35114643b076c91afda79efda6fc/lib/commands/serve.js

回答by mEnE

You can also change the path from config/environment.js file ...

您还可以从 config/environment.js 文件更改路径...

outside of the module.exports = function(environment) { . . . }

在外面 module.exports = function(environment) { . . . }

ENV.baseURL = '/your/new/path';

ENV.baseURL = '/your/new/path';