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 22run "yarn add esbuild"
33
44say "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"
66
77if ( `npx -v` . to_f < 7.1 rescue "Missing" )
88 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 {
55 output : {
66 file : "app/assets/builds/application.js" ,
77 format : "es" ,
8- inlineDynamicImports : true
8+ inlineDynamicImports : true ,
9+ sourcemap : true
910 } ,
1011 plugins : [
1112 resolve ( )
Original file line number Diff line number Diff line change 11const path = require ( "path" )
2- const webpack = require ( ' webpack' )
2+ const webpack = require ( " webpack" )
33
44module . exports = {
55 mode : "production" ,
6+ devtool : "source-map" ,
67 entry : {
78 application : "./app/javascript/application.js"
89 } ,
910 output : {
1011 filename : "[name].js" ,
12+ sourceMapFilename : "[name].js.map" ,
1113 path : path . resolve ( __dirname , "app/assets/builds" ) ,
1214 } ,
1315 plugins : [
You can’t perform that action at this time.
0 commit comments