UNPKG

1.38 kBJavaScriptView Raw
1// @ts-check
2
3/**
4 * The @type annotations are harmless, vscode might just make your life easier
5 * by adding intellisense support whilst you type!
6 */
7
8const { configure } = require('./lib/public')
9
10module.exports = configure({
11 javascripts: {
12 /** @type { import("./lib/public").ITimplaWebpackEntryHook } */
13 entry: ({ resolve: r }) => ({
14 'js-index': r('./js-index.jsx'),
15 'ts-index': r('./ts-index.tsx'),
16 'ts-error': r('./ts-error.ts'),
17 }),
18
19 /** @type { import("./lib/public").ITimplaCustomizeWebpackConfig } */
20 customizeWebpackConfig(w) {
21 // The following helpers are available to aid you in extending the webpack config.
22 const {
23 projectDestPath,
24 projectSrcPath,
25 timplaConfig,
26 timplaProcess,
27 webpack,
28 webpackConfig,
29 webpackMerge,
30 } = w
31 return w.webpackConfig
32 },
33 },
34
35 // To get intellisense for more complex configs, follow the jsdoc example below:
36 // html: {
37 // /** @type { import("./lib/public").ITimplaHofTask } */
38 // alternate: p => {
39 // p.timplaProcess
40 // },
41 // },
42
43 // additionalTasks: {
44 // /** @param p { import("./lib/public").ITimplaHelper } */
45 // initialize: p => {},
46 // development: {
47 // /** @type { import("./lib/public").ITimplaHofTask } */
48 // prebuild(tp) {},
49 // },
50 // },
51})