Skip to content

Commit

Permalink
fix: only use @zeit/webpack-asset-relocator-loader for main process
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed May 4, 2021
1 parent 48904d3 commit 9c112b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
15 changes: 14 additions & 1 deletion webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ module.exports = {
entry: './src/main.ts',
// Put your normal webpack config below here
module: {
rules: require('./webpack.rules'),
rules: [
...require('./webpack.rules'),
{
test: /\.(m?js|node)$/,
parser: { amd: true },
use: {
loader: '@zeit/webpack-asset-relocator-loader',
options: {
outputAssetBase: 'native_modules',
emitDirnameAll: true,
},
},
},
],
},
plugins: plugins.main,
resolve: {
Expand Down
11 changes: 0 additions & 11 deletions webpack.rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ module.exports = [
test: /\.node$/,
use: 'node-loader',
},
{
test: /\.(m?js|node)$/,
parser: { amd: true },
use: {
loader: '@zeit/webpack-asset-relocator-loader',
options: {
outputAssetBase: 'native_modules',
emitDirnameAll: true,
},
},
},
{
// used to load css from npm package, we use styled-components
test: /\.css$/,
Expand Down

0 comments on commit 9c112b2

Please sign in to comment.