File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,9 @@ interface Options {
44
44
compiler? : EmberTemplateCompiler ;
45
45
46
46
// The on-disk path to the ember-template-compiler.js module for our current
47
- // ember version. You need to either set `compilerPath` or set `compiler`.
47
+ // ember version. You may set `compilerPath` or set `compiler`.
48
48
// This will get resolved from the current working directory, so a package name
49
- // like "ember-source/dist/ember-template-compiler" is acceptable.
49
+ // like "ember-source/dist/ember-template-compiler" (the default value) is acceptable.
50
50
compilerPath? : string ;
51
51
52
52
// Allows you to remap what imports will be emitted in our compiled output. By
Original file line number Diff line number Diff line change @@ -10,12 +10,15 @@ export * from './public-types';
10
10
export type Transform = ExtendedPluginBuilder | string | [ string , unknown ] ;
11
11
12
12
export type Options = Omit < SharedOptions , 'transforms' | 'compiler' > & {
13
- // The on-disk path to the ember-template-comipler.js module for our current
14
- // ember version. You need to either set `compilerPath` or set `compiler`.
13
+ // The on-disk path to the ember-template-compiler.js module for our current
14
+ // ember version. You can set either `compilerPath` or set `compiler`. If you
15
+ // set neither, we will attempt to resolve
16
+ // "ember-source/dist/ember-template-compiler.js" from the current working
17
+ // directory.
15
18
compilerPath ?: string ;
16
19
17
20
// The ember-template-compiler.js module that ships within your ember-source
18
- // version. You need to set either `compilerPath` or `compiler`.
21
+ // version. You can set either `compilerPath` or `compiler`.
19
22
compiler ?: EmberTemplateCompiler ;
20
23
21
24
// List of custom transformations to apply to the handlebars AST before
@@ -42,6 +45,10 @@ function handleNodeSpecificOptions(opts: Options): SharedOptions {
42
45
} else if ( opts . compiler ) {
43
46
assertTemplateCompiler ( opts . compiler ) ;
44
47
compiler = opts . compiler ;
48
+ } else {
49
+ let mod : any = cwdRequire ( 'ember-source/dist/ember-template-compiler.js' ) ;
50
+ assertTemplateCompiler ( mod ) ;
51
+ compiler = mod ;
45
52
}
46
53
47
54
let transforms = [ ] ;
You can’t perform that action at this time.
0 commit comments