-
Notifications
You must be signed in to change notification settings - Fork 513
rc.1
breaks when remove: false,
property is set with Error: No errors
message
#371
Comments
Yeah. If I'm interpreting right, both That error is weird, though. It should throw something about extra fields instead of |
I'm getting the same error ( |
@scottdj92 Just getting you here. We probably missed a couple of test cases. |
I see the validator bit. It should be something along const ajv = new Ajv({
useDefaults: true // This mutates the original data with defaults!
});
const isValid = ajv.validate(schema, data);
return {
isValid,
error: ajv.errors && ajv.errorsText()
}; over the current code to comply with ajv API. |
I have a couple of fixes at #372 in case someone wants to give those a go. |
@bebraw I tested your branch with
|
It seems like having |
@filipesilva Are you sure it's complaining about |
To be perfectly honest, the example I gave originally was from the readme and not our code per se: https://github.com/webpack-contrib/extract-text-webpack-plugin#usage |
@filipesilva Thanks for pointing that out. The readme example needs tweaking. |
@bebraw Yep my bad I though |
@michael-ciniawsky #373 for the fix. Just improving the other fix based on @filipesilva's feedback. |
@filipesilva Alright. Would you mind giving another go? There was some wiring to do. |
@bebraw now I get this one:
|
@filipesilva Gotcha. I added |
The latest commit seems to work! I also tested with
|
@filipesilva Awesome. Thanks for confirmation. 👍 |
Thanks for taking the time to fix this so promptly! |
Is it fixed in rc.3 ?
and still have
My full webpack config is const path = require("path");
const webpack = require("webpack");
const merge = require("webpack-merge");
/* Some contants */
const PLUGINS = {
CopyWebpackPlugin: require("copy-webpack-plugin"),
Dashboard: require("webpack-dashboard"),
DashboardPlugin: require("webpack-dashboard/plugin"),
ExtractTextPlugin: require("extract-text-webpack-plugin"),
};
const PATHS = {
outputPath: path.join(__dirname, "dist"),
app: path.join(__dirname, "app"),
};
const APP_NAME = "";
/* Some helper functions */
/**
* Extract options.entries in chuck options.name.
* @param options
* @returns {{entry: {}, plugins: [*]}}
*/
function extractBundle(options) {
const entry = {};
entry[options.name] = options.entries;
return {
// Define an entry point needed for splitting.
entry: entry,
plugins: [
// Extract bundle and manifest files. Manifest is
// needed for reliable caching.
new webpack.optimize.CommonsChunkPlugin({
names: [options.name, 'manifest']
})
]
};
}
/**
* We lookup for vendor dependencies directly in package.json but we exclude some excludedDeps deps.
* @returns {Array.<*>} dependencies array.
*/
function getVendorEntries(excludedDeps) {
return Object.keys(require('./package.json').dependencies)
.filter((dep) => (!excludedDeps.find(d => d === dep)));
}
/**
* Minify stuff.
*/
function minify() {
return {
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};
}
/**
* Set some thing via DefinePlugin.
* @param key
* @param value
*/
function setFreeVariable(key, value) {
const env = {};
env[key] = JSON.stringify(value);
return {
plugins: [
new webpack.DefinePlugin(env)
]
};
}
function enableWebpackDashboard() {
return {
plugins: [
new PLUGINS.DashboardPlugin(new PLUGINS.Dashboard().setData)
]
};
}
/* Conf decalartions */
// Common conf for all build configurations.
const common = merge(
{
entry: {
app: path.join(PATHS.app, "views", `${APP_NAME}.tsx`),
},
output: {
path: PATHS.outputPath,
filename: "[name].bundle.js",
publicPath: '/',
},
resolve: {
extensions: [".js", ".ts", ".tsx", ".css"],
},
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /(node_modules)/,
loaders: [
"react-hot-loader",
"ts-loader",
],
},
{
test: /\.css$/,
use: PLUGINS.ExtractTextPlugin.extract({
fallback: "style-loader",
use: "css-loader"
})
},
{
test: /\.eot(\?v=\d+\.\d+\.\d+(.*)?)?$/,
use: { loader: "file-loader" }
},
{
test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+(.*)?)?$/,
use: {
loader:"url-loader?prefix=font/&limit=5000"
}
},
{
test: /\.ttf(\?v=\d+\.\d+\.\d+(.*)?)?$/,
use: {
loader: "url-loader?limit=10000&mimetype=application/octet-stream"
}
},
{
test: /\.(svg|png|jpg|gif)(\?v=\d+\.\d+\.\d+(.*)?)?$/,
use: {
loader: "url-loader?limit=10000&mimetype=image/svg+xml"
}
},
],
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
}),
new PLUGINS.CopyWebpackPlugin([
{
from: path.join(PATHS.app, "assets/index.html"),
to: "index.html",
},
{
from: path.join(PATHS.app, "assets"),
to: "assets",
}
]),
new PLUGINS.ExtractTextPlugin(`${APP_NAME}.bundle.css`),
new webpack.HotModuleReplacementPlugin(),
],
},
extractBundle({
name: "vendor",
// "font-awesome", "ionicons" are excluded as they doesnt contain any js file
// "jquery", "bootstrap", "admin-lte" are excluded as they doesnt work in vendor bundle
entries: getVendorEntries(["font-awesome", "ionicons", "jquery", "bootstrap", "admin-lte"]),
})
);
// Webpack dev server conf for development configuration
const wds = {
devServer: {
host: "0.0.0.0",
port: 9777,
// où on copie html.
outputPath: PATHS.outputPath,
// où on cherche nos fichiers statique.
contentBase: "dist/",
inline: true,
hot: true,
// WebpackDashboard needs it to do its things.
quiet: true,
historyApiFallback: {
rewrites: [
{
from: /.*\..*/, to: "/index.html",
},
],
},
proxy: {
"/back": {
target: ,
pathRewrite: {
// remove base path
"^/back" : "",
}
}
},
}
};
// We use process.env.NODE_ENV development/production meaning for modify our webpack conf.
// We also provide debug mode that is equal to development mode with the source maps generations.
// These variables also used to set default log level as :
// DEVELOPMENT - INFO
// DEBUG - DEBUG
// PRODUCTION - WARN
const DEVELOPMENT = "development";
const DEBUG = "debug";
const PRODUCTION = "production";
function buildConf(env) {
env = env || DEVELOPMENT;
// DEV
if (env == DEVELOPMENT) {
return merge(
common,
wds,
// enableWebpackDashboard(),
setFreeVariable(
"process.env.NODE_ENV",
DEVELOPMENT
)
);
}
// DEBUG
else if (env == DEBUG) {
return merge(
common,
wds,
{
devtool: "eval-source-map",
},
enableWebpackDashboard(),
setFreeVariable(
"process.env.NODE_ENV",
DEBUG
)
);
}
// PROD BUILD
return merge(
common,
{
devtool: "source-map",
},
wds,
setFreeVariable(
"process.env.NODE_ENV",
PRODUCTION
),
minify()
);
}
module.exports = buildConf(process.env.NODE_ENV); |
Did you do |
I certainly did `npm update` .
I'll try install, ty.
Le ven. 24 févr. 2017 à 19:31, Scott Jones <[email protected]> a
écrit :
… Did you do npm install after you upgraded? ajv is a dependency of
extract-text-plugin now
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#371 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHIu-pZz2u5DWd7pACTC54RyvTWJJbokks5rfyIQgaJpZM4LwfvU>
.
|
Thx |
Versions: using
[email protected]
,[email protected]
, OS: anyRepro steps - include
remove:false
inRun webpack, see similar error message:
This specific message was generated using
angular-cli
(angular/angular-cli#4264).In there we use
remove: false,
which still seems to exist (https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/loader.js#L40) but not be accepted starting inrc.1
.I'm not sure if the property itself is deprecated since it doesn't show in https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/CHANGELOG.md.
The text was updated successfully, but these errors were encountered: