문제

I have done a quick test with doing it after the compilation, but this of course breaks the source maps line numbering.

The closest flag I found in --help is --output_wrapper which takes a string (not filename) as a parameter, which means the command is going to be quuuuite long.

How can I insert content of a file into the beginning of the minified file and keep the source maps working?

도움이 되었습니까?

해결책

You can use use an index map souce map to build a source map that refers to the original maps of the concatenated files.

다른 팁

Use a tool other than Closure-compiler. This heavily depends on your build environment as to what tool would be best suited. Closure-compiler does not handle basic file concatenation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top