refactor(assets): swap webpack for esbuild
- Remove all webpack and babel related npm dependencies - Add esbuild and esbuild-plugin-postcss2 as a dependency - Add a custom `build.js` script to build css and js with esbuild and copy static files to the priv/static directory - Modify `config/dev.exs` to use that build script as a watcher instead of webpack - Modify `package.json` to use that build script in instead of webpack - Modify `KetbinWeb.Endpoint` to serve the assets directory instead of css and js directories from static - Modify the `app.html.eex` layout to use `assets` directory instead of separate css and js directories Signed-off-by: Akshit Garg <garg.akshit@gmail.com>
This commit is contained in:
7 files changed
+419
-7926
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
// We need to import the CSS so that webpack will load it.
|
||||
// The MiniCssExtractPlugin is used to separate it out into
|
||||
// its own CSS file.
|
||||
import "../css/app.css"
|
||||
import "../css/app.css";
|
||||
|
||||
// webpack automatically bundles all modules in your
|
||||
// entry points. Those entry points can be configured
|
||||
@@ -12,4 +12,4 @@ import "../css/app.css"
|
||||
// import {Socket} from "phoenix"
|
||||
// import socket from "./socket"
|
||||
//
|
||||
import "phoenix_html"
|
||||
import "phoenix_html";
|
||||
Reference in new issue
Block a user