File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2
2
run "yarn add esbuild"
3
3
4
4
say "Add build script"
5
- build_script = "esbuild app/javascript/*.* --bundle --outdir=app/assets/builds"
5
+ build_script = "esbuild app/javascript/*.* --bundle --sourcemap -- outdir=app/assets/builds"
6
6
7
7
if ( `npx -v` . to_f < 7.1 rescue "Missing" )
8
8
say %(Add "scripts": { "build": "#{ build_script } " } to your package.json) , :green
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ export default {
5
5
output : {
6
6
file : "app/assets/builds/application.js" ,
7
7
format : "es" ,
8
- inlineDynamicImports : true
8
+ inlineDynamicImports : true ,
9
+ sourcemap : true
9
10
} ,
10
11
plugins : [
11
12
resolve ( )
Original file line number Diff line number Diff line change 1
1
const path = require ( "path" )
2
- const webpack = require ( ' webpack' )
2
+ const webpack = require ( " webpack" )
3
3
4
4
module . exports = {
5
5
mode : "production" ,
6
+ devtool : "source-map" ,
6
7
entry : {
7
8
application : "./app/javascript/application.js"
8
9
} ,
9
10
output : {
10
11
filename : "[name].js" ,
12
+ sourceMapFilename : "[name].js.map" ,
11
13
path : path . resolve ( __dirname , "app/assets/builds" ) ,
12
14
} ,
13
15
plugins : [
You can’t perform that action at this time.
0 commit comments