publicPath is ../ for styles, and optionally uses envar for everything else
This commit is contained in:
@@ -40,3 +40,6 @@ module.exports = mergeWithConcat(config, {
|
|||||||
manifest: {},
|
manifest: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (config.enabled.watcher && !process.env.WEBPACK_PUBLIC_PATH) {
|
||||||
|
process.env.WEBPACK_PUBLIC_PATH = config.publicPath;
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ let webpackConfig = {
|
|||||||
include: config.paths.assets,
|
include: config.paths.assets,
|
||||||
loader: ExtractTextPlugin.extract({
|
loader: ExtractTextPlugin.extract({
|
||||||
fallbackLoader: 'style',
|
fallbackLoader: 'style',
|
||||||
|
publicPath: '../',
|
||||||
loader: [
|
loader: [
|
||||||
`css?${sourceMapQueryStr}`,
|
`css?${sourceMapQueryStr}`,
|
||||||
'postcss',
|
'postcss',
|
||||||
@@ -60,6 +61,7 @@ let webpackConfig = {
|
|||||||
include: config.paths.assets,
|
include: config.paths.assets,
|
||||||
loader: ExtractTextPlugin.extract({
|
loader: ExtractTextPlugin.extract({
|
||||||
fallbackLoader: 'style',
|
fallbackLoader: 'style',
|
||||||
|
publicPath: '../',
|
||||||
loader: [
|
loader: [
|
||||||
`css?${sourceMapQueryStr}`,
|
`css?${sourceMapQueryStr}`,
|
||||||
'postcss',
|
'postcss',
|
||||||
@@ -140,8 +142,8 @@ let webpackConfig = {
|
|||||||
'window.Tether': 'tether',
|
'window.Tether': 'tether',
|
||||||
}),
|
}),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
WEBPACK_PUBLIC_PATH: (config.enabled.watcher)
|
WEBPACK_PUBLIC_PATH: (process.env.WEBPACK_PUBLIC_PATH)
|
||||||
? JSON.stringify(config.publicPath)
|
? JSON.stringify(process.env.WEBPACK_PUBLIC_PATH)
|
||||||
: false,
|
: false,
|
||||||
}),
|
}),
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
|||||||
Reference in New Issue
Block a user