Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle webpack loader and esm module #142

Merged
merged 1 commit into from Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions tools/electron/build/webpack.extension-host.config.js
Expand Up @@ -35,6 +35,8 @@ const nodeTarget = {
configFile: tsConfigPath,
},
},
{ test: /\.css$/, loader: require.resolve('null-loader') },
erha19 marked this conversation as resolved.
Show resolved Hide resolved
{ test: /\.less$/, loader: require.resolve('null-loader') },
],
},
externals: [
Expand Down Expand Up @@ -84,6 +86,8 @@ const workerTarget = {
configFile: tsConfigPath,
},
},
{ test: /\.css$/, loader: require.resolve('null-loader') },
{ test: /\.less$/, loader: require.resolve('null-loader') },
],
},
externals: [
Expand Down
1 change: 1 addition & 0 deletions tools/electron/build/webpack.node.config.js
Expand Up @@ -19,6 +19,7 @@ module.exports = {
node: false,
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json', '.less'],
mainFields: ['loader', 'main'],
plugins: [
new TsconfigPathsPlugin({
configFile: tsConfigPath,
Expand Down