aboutsummaryrefslogtreecommitdiff
path: root/vnext/serve.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-11-06 04:30:51 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit8c2b2cee1f8701479bafbd69069847e50e8f0d67 (patch)
treeda01fcbc17b705a74cb4b37b1b06d4b30dbaab29 /vnext/serve.js
parent7b14a8f3faf7672f0aefbf93d5c37f62a169b535 (diff)
webpack -> postcss+esbuild
Diffstat (limited to 'vnext/serve.js')
-rw-r--r--vnext/serve.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/vnext/serve.js b/vnext/serve.js
new file mode 100644
index 00000000..7638c070
--- /dev/null
+++ b/vnext/serve.js
@@ -0,0 +1,20 @@
+const esbuild = require('esbuild');
+
+esbuild
+ .serve(
+ {
+ servedir: 'public',
+ port: 8000,
+ },
+ {
+ entryPoints: ['./src/index.js'],
+ outfile: './public/index.js',
+ bundle: true,
+ loader: {
+ '.js': 'jsx',
+ '.png': 'file',
+ '.svg': 'file'
+ }
+ }
+ )
+ .catch(() => process.exit());