The frontend/UI server, written in JS using the MarkoJS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
898 B

  1. const isProduction = process.env.NODE_ENV === "production"
  2. module.exports = {
  3. plugins: [
  4. "lasso-marko",
  5. "lasso-less",
  6. ],
  7. outputDir: "./.static", // Place all generated JS/CSS/etc. files into the "static" dir
  8. bundlingEnabled: isProduction, // Only enable bundling in production
  9. minify: isProduction, // Only minify JS and CSS code in production
  10. fingerprintsEnabled: isProduction, // Only add fingerprints to URLs in production
  11. loadPrebuild: isProduction, // Only load prebuilt stuff in prod.
  12. require: {
  13. builtins: {
  14. fs: require.resolve("empty-module"),
  15. },
  16. transforms: isProduction ? [
  17. {
  18. transform: "lasso-babel-transform",
  19. config: {
  20. extensions: [".js", ".es6"], // Enabled file extensions. Default: [".js", ".es6"]
  21. babelOptions: {
  22. presets: [ "es2015" ]
  23. }
  24. }
  25. }
  26. ] : null
  27. }
  28. }