I saw some instructions for frontend-build that looked promising, and it looked like I could just plop a webpack.config.dev.js at the root of my new app and it would work. It definitely gets picked up - I can’t work out what to put in there though! If I try and use the same (commonjs I guess?) syntax from the frontend-build example it complains about [webpack-cli] SyntaxError: Unexpected token 'export' and if I try and use an ESM import then it says [webpack-cli] TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts".
I admit this feature hasn’t been properly tested since the port to frontend-base, so I’m not particularly surprised it’s failing. I also haven’t had time to debug it, yet. (And probably won’t until after the Ulmo cut from master.)
What I can tell you now is that when I do start debugging this, I’ll start looking at what the default webpack/webpack.config.dev.js ends up looking like. It is currently compiled by tsc from tools/config/webpack/webpack.config.dev.ts into tools/dist/webpack/webpack.config.dev.js (which is what ends up getting used) with some interesting incantations at the top. Such as:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
You could try to replicate these on you plain js version, but ideally one would also be able to use a Typescript version that gets compiled similarly. I’ll try to get this working, at some point.