Can't complie ES6 Modules.
See original GitHub issueCommand Line:
java -jar compiler.jar --js_output_file ./../app.cls.js --js **.js --js_module_root './' --process_common_js_modules --transform_amd_modules --language_
in ECMASCRIPT6
./app.js
import TestClass from './components/TestClass';
export default class Application {
/**
* dfdf
* @var
*/
constructor() {
new TestClass();
}
/**
* dfdf
* @var
*/
test() {
alert('dfdf');
}
}
'./components/TestClass.js'
export default class TestClass {
/**
* dfdf
* @var
*/
constructor() {
alert('test');
}
/**
* dfdf
* @var
*/
test() {
}
}
WARNING - Failed to load module "components/TestClass.js"
app.js:2: ERROR - required "module$components$TestClass" namespace never provided
import TestClass from 'components/TestClass';
^
1 error(s), 1 warning(s)
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Can't use TypeScript modules that import ES6 ... - GitHub
I am trying to use some ES6 code from a module source folder in node_modules , however that code never gets transpiled to...
Read more >r.js won't compile ES6 - Stack Overflow
I tried webpack, but it seems i can't get it work. I need the same output as r.js with unnamed defines to concatenated...
Read more >Avoid these issues when using new ECMAScript modules in ...
Importing commonjs modules into ECMAScript es6 modules. Now that you're targeting es6 or higher you can't require() any commonjs modules in your ...
Read more >Node Modules at War: Why CommonJS and ES ... - Code Red
ESM can't import named CJS exports unless CJS scripts execute out of order ... That's because CJS scripts compute their named exports as...
Read more >How to transpile ES modules with webpack and Node.js
As we have mentioned earlier, transpilers either perform the job of compiling one language to another, or to make a language backward compatible ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I plan on adding a better error message for this case. It comes up often.
fixed is using */.js