swico 0.8.2-beta6 → 0.8.2-beta8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/command/start.js +10 -0
- package/src/config/webpack.dev.js +2 -0
package/package.json
CHANGED
package/src/command/start.js
CHANGED
|
@@ -136,7 +136,9 @@ var createCompileListener = function (compiler) {
|
|
|
136
136
|
compiler.hooks.beforeCompile.tap('beforeCompile', function () {
|
|
137
137
|
tools_1.toast.info('Compiling...', { wrap: false });
|
|
138
138
|
});
|
|
139
|
+
compiler.hooks;
|
|
139
140
|
compiler.hooks.done.tap('done', function (stats) {
|
|
141
|
+
console.log('done');
|
|
140
142
|
var info = stats.toJson();
|
|
141
143
|
if (stats.hasErrors()) {
|
|
142
144
|
tools_1.toast.error(info.errors.map(function (item) { return item.stack; }));
|
|
@@ -147,6 +149,14 @@ var createCompileListener = function (compiler) {
|
|
|
147
149
|
}
|
|
148
150
|
tools_1.toast.info("Compiled complete in ".concat(info.time, "ms"));
|
|
149
151
|
});
|
|
152
|
+
compiler.watch({}, function (err, stats) {
|
|
153
|
+
console.log('watch');
|
|
154
|
+
var info = stats.toJson();
|
|
155
|
+
if (err || stats.hasErrors() || stats.hasWarnings()) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
tools_1.toast.info("Compiled successfully in ".concat(info.time, "ms"), { wrap: false });
|
|
159
|
+
});
|
|
150
160
|
};
|
|
151
161
|
function start() {
|
|
152
162
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -128,6 +128,8 @@ function default_1(options) {
|
|
|
128
128
|
plugins: __spreadArray([
|
|
129
129
|
new eslint_webpack_plugin_1.default({
|
|
130
130
|
context: path_1.default.join(projectPath, '/src'),
|
|
131
|
+
failOnError: false,
|
|
132
|
+
failOnWarning: false,
|
|
131
133
|
extensions: templateType === 'vue' ? ['vue', 'ts', 'js'] : ['tsx', 'ts', 'js'],
|
|
132
134
|
emitError: false,
|
|
133
135
|
emitWarning: false,
|