@aligent/nx-appbuilder 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -103,6 +103,7 @@ The app generator always renders a **base** subtree into `<app-name>/`:
|
|
|
103
103
|
|
|
104
104
|
- **Action and test scaffolding**:
|
|
105
105
|
- `src/actions/tsconfig.json` - TypeScript config for the App Builder actions
|
|
106
|
+
- `src/actions/webpack-config.cjs` - Webpack config used by the `aio` CLI to compile actions via `babel-loader`
|
|
106
107
|
- `tests/tsconfig.json` - TypeScript config for the test suite
|
|
107
108
|
- `hooks/check-action-types.sh` - `pre-app-build` hook that type-checks actions before deploy
|
|
108
109
|
- `global-types/@adobe/aio-sdk/*.d.ts` - Local type augmentations for the Adobe AIO SDK
|
package/package.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Webpack configuration required to compile typescript action and web source code
|
|
2
|
+
// using the Adobe aio CLI. Adapted from https://github.com/adobe/aio-cli-plugin-app-dev, then switched to babel-loader
|
|
3
|
+
// Appbuilder documentation: https://developer.adobe.com/app-builder/docs/guides/configuration/webpack-configuration/
|
|
4
|
+
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
devtool: 'inline-source-map',
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
'@': path.resolve(__dirname, '..'),
|
|
12
|
+
},
|
|
13
|
+
extensions: ['.ts'],
|
|
14
|
+
extensionAlias: {
|
|
15
|
+
'.js': ['.ts', '.js'],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
module: {
|
|
19
|
+
rules: [
|
|
20
|
+
{
|
|
21
|
+
// Test for .ts - in theory actions should never use .tsx
|
|
22
|
+
test: /\.ts$/,
|
|
23
|
+
exclude: /node_modules/,
|
|
24
|
+
loader: 'babel-loader',
|
|
25
|
+
options: {
|
|
26
|
+
// Point to the babel config for actions
|
|
27
|
+
// This is done to avoid Parcel reading the config file
|
|
28
|
+
// while building web code
|
|
29
|
+
configFile: './babel.actions.config.js',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
};
|