-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(folder): update build folder for all projects
- Loading branch information
Showing
7 changed files
with
42 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ Figma Chat/ | |
node_modules | ||
*.zip | ||
dist | ||
build | ||
build | ||
release |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,43 @@ | ||
const PnpWebpackPlugin = require('pnp-webpack-plugin'); | ||
const path = require('path'); | ||
|
||
module.exports = function override(webpackConfig, env) { | ||
// const tsRule = webpackConfig.module.rules[1].oneOf[2]; | ||
// tsRule.include = undefined; | ||
// tsRule.exclude = /node_modules/; | ||
module.exports = { | ||
paths: function (paths, env) { | ||
paths.appBuild = path.join( | ||
paths.appBuild, | ||
'..', | ||
'..', | ||
'..', | ||
'release', | ||
'web' | ||
); | ||
return paths; | ||
}, | ||
webpack: (webpackConfig, env) => { | ||
// const tsRule = webpackConfig.module.rules[1].oneOf[2]; | ||
// tsRule.include = undefined; | ||
// tsRule.exclude = /node_modules/; | ||
|
||
webpackConfig.module.rules.push({ | ||
test: /\.tsx?$/, | ||
loader: require.resolve('ts-loader'), | ||
options: { | ||
transpileOnly: true, | ||
}, | ||
}); | ||
webpackConfig.module.rules.push({ | ||
test: /\.tsx?$/, | ||
loader: require.resolve('ts-loader'), | ||
options: { | ||
transpileOnly: true, | ||
}, | ||
}); | ||
|
||
webpackConfig.resolve.plugins = webpackConfig.resolve.plugins.filter( | ||
({ constructor }) => { | ||
if (!constructor) return true; | ||
return constructor.name !== 'ModuleScopePlugin'; | ||
} | ||
); | ||
webpackConfig.resolve.plugins = webpackConfig.resolve.plugins.filter( | ||
({ constructor }) => { | ||
if (!constructor) return true; | ||
return constructor.name !== 'ModuleScopePlugin'; | ||
} | ||
); | ||
|
||
webpackConfig.resolve.plugins.unshift(PnpWebpackPlugin); | ||
webpackConfig.resolve.plugins.unshift(PnpWebpackPlugin.moduleLoader(module)); | ||
webpackConfig.resolve.plugins.unshift(PnpWebpackPlugin); | ||
webpackConfig.resolve.plugins.unshift( | ||
PnpWebpackPlugin.moduleLoader(module) | ||
); | ||
|
||
return webpackConfig; | ||
return webpackConfig; | ||
}, | ||
}; |