Skip to content

Commit

Permalink
fix: handle webpack loader and esm module (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
yantze authored Dec 17, 2021
1 parent ffc8ffb commit 0de46db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/electron/build/webpack.extension-host.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const nodeTarget = {
configFile: tsConfigPath,
},
},
{ test: /\.css$/, loader: require.resolve('null-loader') },
{ 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
Original file line number Diff line number Diff line change
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

0 comments on commit 0de46db

Please sign in to comment.