-
Notifications
You must be signed in to change notification settings - Fork 28
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
PLAT-44298: Resolve serving issues #89
Changes from all commits
6e7465e
681c6b0
ace6b23
6566016
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,45 @@ module.exports = function(args) { | |
|
||
const config = hotDevServer(devConfig); | ||
|
||
// Temporary workaround until https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/579 is fixed | ||
const enact = require(path.resolve('./package.json')).enact || {}; | ||
const autoprefixer = require('autoprefixer'); | ||
const LessPluginRi = require('resolution-independence'); | ||
config.module.rules[4] = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we "find" the index here (and below) rather than hard coding it? Might save us from accidentally breaking this without noticing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not easily given the loader name itself is dynamic generated from extract-text-plugin. If we want a more complex detection system I can implement that, though given we control the config and this is solely a |
||
test: /\.(c|le)ss$/, | ||
use: [ | ||
require.resolve('style-loader'), | ||
{ | ||
loader: require.resolve('css-loader'), | ||
options: { | ||
importLoaders: 2, | ||
modules: true, | ||
sourceMap: true, | ||
localIdentName: '[name]__[local]___[hash:base64:5]' | ||
} | ||
}, | ||
{ | ||
loader: require.resolve('postcss-loader'), | ||
options: { | ||
ident: 'postcss', | ||
sourceMap: true, | ||
plugins: () => [ | ||
autoprefixer({browsers:['>1%', 'last 4 versions', 'Firefox ESR', 'not ie < 9'], flexbox:'no-2009'}), | ||
require('postcss-flexbugs-fixes') | ||
] | ||
} | ||
}, | ||
{ | ||
loader: require.resolve('less-loader'), | ||
options: { | ||
sourceMap: true, | ||
plugins: ((enact.ri) ? [new LessPluginRi(enact.ri)] : []) | ||
} | ||
} | ||
] | ||
}; | ||
config.plugins.splice(2, 1); | ||
|
||
// Warn and crash if required files are missing | ||
if (!checkRequiredFiles([config.entry.main[config.entry.main.length-1]])) { | ||
process.exit(1); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a prop that was accidentally omitted last release (change already exists within production config). Just brings up to parity.