Skip to content

Commit

Permalink
fix(stark-build): fix prettier - Module not found: Error: Can't resol…
Browse files Browse the repository at this point in the history
…ve '@microsoft/typescript-etw'

ISSUES CLOSED: #1483
  • Loading branch information
SuperITMan committed Jan 14, 2020
1 parent 52ae6e0 commit 21fe06a
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions packages/stark-build/config/webpack-partial.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ module.exports = metadata => {
* See: https://webpack.js.org/configuration/module
*/
module: {
// FIXME Remove the following line once Prettier 2.0.0 is released. See: https://github.com/NationalBankBelgium/stark/issues/1483
noParse: /prettier\/parser-typescript/,

rules: [
/**
* TSLint loader support for *.ts files
Expand Down Expand Up @@ -156,10 +159,10 @@ module.exports = metadata => {
// xhtml: true, // TODO: why XHTML?
minify: isProd
? {
caseSensitive: true,
collapseWhitespace: true,
keepClosingSlash: true
}
caseSensitive: true,
collapseWhitespace: true,
keepClosingSlash: true
}
: false
}),

Expand Down Expand Up @@ -229,10 +232,10 @@ module.exports = metadata => {
*/
...(fs.existsSync(helpers.root("config/index-head-config.js"))
? [
new HtmlElementsWebpackPlugin({
headTags: require(helpers.root("config/index-head-config"))
})
]
new HtmlElementsWebpackPlugin({
headTags: require(helpers.root("config/index-head-config"))
})
]
: []),

/**
Expand All @@ -252,14 +255,14 @@ module.exports = metadata => {
*/
...(MONITOR
? [
new WebpackMonitor({
capture: true, // -> default 'true'
target: helpers.root("reports/webpack-monitor/stats.json"), // default -> '../monitor/stats.json'
launch: true, // -> default 'false'
port: 3030, // default 8081
excludeSourceMaps: true // default 'true'
})
]
new WebpackMonitor({
capture: true, // -> default 'true'
target: helpers.root("reports/webpack-monitor/stats.json"), // default -> '../monitor/stats.json'
launch: true, // -> default 'false'
port: 3030, // default 8081
excludeSourceMaps: true // default 'true'
})
]
: []),

/**
Expand All @@ -269,13 +272,13 @@ module.exports = metadata => {
*/
...(BUNDLE_ANALYZER
? [
new BundleAnalyzerPlugin({
generateStatsFile: true, // default 'false'
statsFilename: helpers.root("reports/bundle-analyzer/stats.json"), // default -> 'stats.json'
openAnalyzer: true, //default 'true'
analyzerPort: 3030 // default 8888
})
]
new BundleAnalyzerPlugin({
generateStatsFile: true, // default 'false'
statsFilename: helpers.root("reports/bundle-analyzer/stats.json"), // default -> 'stats.json'
openAnalyzer: true, //default 'true'
analyzerPort: 3030 // default 8888
})
]
: []),

/**
Expand Down

0 comments on commit 21fe06a

Please sign in to comment.