Bjørn Erik Pedersen
b60e9279ab
js: Fix potential path issue on Windows
2021-02-16 16:10:46 +01:00
Bjørn Erik Pedersen
440fdb0eb9
deps: Update to esbuild v0.8.39
...
Fixes #8189
2021-02-01 11:28:12 +01:00
Bjørn Erik Pedersen
32b86076ee
js: Add Inject config option
...
Fixes #8164
2021-01-22 23:43:44 +01:00
Bjørn Erik Pedersen
e19a046c4b
js: Add Shims option
...
This commit adds a new `shims` option to `js.Build` that allows swapping out a component with another.
Fixes #8165
2021-01-22 09:03:24 +01:00
Bjørn Erik Pedersen
a1fe552fc9
Fix nilpointer in js.Build error handling
...
Fixes #8162
2021-01-21 10:09:33 +01:00
Andreas Richter
2c8b5d9165
pipes: Add external source map support to js.Build and Babel
...
Fixes #8132
2021-01-18 10:38:09 +01:00
Bjørn Erik Pedersen
d90e37e0c6
all: Format code with gofumpt
...
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Bjørn Erik Pedersen
8a6e706053
deps: Update to github.com/evanw/esbuild 0.8.11 to 0.8.14
...
Closes #7986
2020-11-25 17:39:51 +01:00
Bjørn Erik Pedersen
78f227b664
js: Let ESBuild handle all imports from node_modules
...
This commit fixes some issues where modules in /assets share the same name as in node_modules.
This was not intended, and with this commit the node_modules-components should be isolated. If you want to redefine something inside node_modules, use the `defines` option.
Fixes #7948
2020-11-13 08:54:29 +01:00
Bjørn Erik Pedersen
944150bafb
js: Remove external source map option
...
It was merged by accident and the implementation does not look correct.
Fixes #7932
2020-11-04 23:04:12 +01:00
Bjørn Erik Pedersen
bf2837a314
js: Misc fixes
...
* Fix resolve of package.json deps in submodules
* Fix directory logic for writing assets/jsconfig.json
Fixes #7924
Fixes #7923
2020-11-04 19:21:43 +01:00
Bjørn Erik Pedersen
3b2fe3cd33
js: Add avoidTDZ option
...
Fixes #7865
2020-11-03 13:04:37 +01:00
Bjørn Erik Pedersen
85e4dd7370
Make js.Build fully support modules
...
Fixes #7816
Fixes #7777
Fixes #7916
2020-11-03 13:04:37 +01:00
Andreas Richter
3089fc0ba1
js.Build: Generate tsconfig files
...
Updates #7777
Added support to allow SourceMap files to be external to the build.
In addition added more information when the js compilation has an error.
Correctly append sourceMappingURL to output file.
Fix merge conflict.
2020-11-03 13:04:37 +01:00
Andreas Richter
c6b661de82
js.Build: Add SourceMap flag with inline option
...
Added a flag to allow turning on sourcemap in ESBuild. The current support
can only support inline or true as value for sourcemap. This is because
the way ESBuild is invoked it doesn't have a separate output path
to write the mapfile external to the asset pipeline. Add disable for "" and "0".
Add test script and make sure mage check passes.
Fixes #7607
2020-09-01 16:19:08 +02:00
Bjørn Erik Pedersen
0256959a35
resources/js: Add option for setting bundle format
...
Fixes #7503
2020-07-22 10:13:30 +02:00
Bjørn Erik Pedersen
eded9ac2a0
resources/js: Simplify options handling
...
Mostly to minify cache hash breakage.
Updates #7499
2020-07-22 10:13:30 +02:00
Bjørn Erik Pedersen
e81aef0a95
resources/js: Add es5 build target
2020-07-20 22:26:38 +02:00
Bjørn Erik Pedersen
35011bcb26
Add .Defines to js.Build options
...
This is needed to import `react` as a library, e.g.:
```
{{ $jsx := resources.Get "index.jsx" }}
{{ $options := dict "defines" (dict "process.env.NODE_ENV" "\"development\"") }}
{{ $js := $jsx | js.Build $options }}
```
Fixes #7489
2020-07-17 19:09:09 +02:00
Bjørn Erik Pedersen
9df98ec49c
Add proper Media Type handling in js.Build
...
See #732
2020-07-13 10:56:23 +02:00
Remko Tronçon
2fc3380707
Add js.Build asset bundling
...
Fixes #7321
2020-07-13 10:56:23 +02:00