Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .erb/configs/webpack.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import webpack from 'webpack';
import TsconfigPathsPlugins from 'tsconfig-paths-webpack-plugin';
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
import webpackPaths from './webpack.paths';
import { dependencies as externals } from '../../release/app/package.json';

Expand All @@ -28,6 +29,11 @@ const configuration: webpack.Configuration = {
},
},
},
{
// You may need a more specific glob if you have other YAML files unrelated to Ensemble
test: /\.yaml$/i,
type: 'asset/source',
},
],
},

Expand All @@ -47,12 +53,36 @@ const configuration: webpack.Configuration = {
modules: [webpackPaths.srcPath, 'node_modules'],
// There is no need to add aliases here, the paths in tsconfig get mirrored
plugins: [new TsconfigPathsPlugins()],
fallback: {
fs: false,
path: false,
zlib: false,
stream: false,
http: false,
https: false,
tty: false,
os: false,
},
},

plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
}),

new NodePolyfillPlugin({
excludeAliases: ['console'],
}),

new webpack.DefinePlugin({
'process.env': Object.keys(process.env).reduce<Record<string, string>>(
(env, key) => {
env[key] = JSON.stringify(process.env[key]);
return env;
},
{},
),
}),
],
};

Expand Down
5 changes: 5 additions & 0 deletions .erb/configs/webpack.config.renderer.dev.dll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import webpack from 'webpack';
import path from 'path';
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
import { merge } from 'webpack-merge';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
Expand Down Expand Up @@ -71,6 +72,10 @@ const configuration: webpack.Configuration = {
},
},
}),

new NodePolyfillPlugin({
excludeAliases: ['console'],
}),
],
};

Expand Down
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
auto-install-peers = true
@ensembleui:registry = https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
Loading