Skip to content

Commit f9d65d9

Browse files
authored
Update prod build (#572)
* Remove watch from prod build * x -> X * bump version for CI * Revert "bump version for CI" This reverts commit 2c9d24d.
1 parent 8e5a56a commit f9d65d9

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "codex.editor",
33
"version": "2.7.12",
4-
"description": "Codex Editor. Native JS, based on API and Open Source",
4+
"description": "CodeX Editor. Native JS, based on API and Open Source",
55
"main": "dist/codex-editor.js",
66
"types": "./types/index.d.ts",
77
"scripts": {
88
"build": "rimraf dist/* && yarn svg && yarn build:prod",
99
"build:win": "rimraf dist && yarn svg:win && yarn build:prod",
10-
"build:dev": "webpack --mode development --progress --display-error-details --display-entrypoints",
11-
"build:prod": "webpack --mode production --progress --display-error-details --display-entrypoints",
10+
"build:dev": "webpack --mode development --progress --display-error-details --display-entrypoints --watch",
11+
"build:prod": "webpack --mode production",
1212
"svg:win": "if not exist dist md dist && yarn svg",
1313
"svg": "svg-sprite-generate -d src/assets/ -o dist/sprite.svg",
1414
"pull_tools": "git submodule update --init --recursive"

webpack.config.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,27 @@ module.exports = (env, argv) => {
2929
entry: {
3030
'codex-editor': ['@babel/polyfill/noConflict', './src/codex.ts']
3131
},
32+
3233
output: {
3334
path: path.resolve(__dirname, 'dist'),
3435
filename: '[name].js',
3536
library: [ 'CodexEditor' ],
3637
libraryTarget: 'umd'
3738
},
3839

39-
watch: true,
4040
watchOptions: {
4141
aggregateTimeout: 50
4242
},
4343

4444
/**
4545
* Tell webpack what directories should be searched when resolving modules.
4646
*/
47-
resolve : {
48-
modules : [path.join(__dirname, 'src'), 'node_modules'],
47+
resolve: {
48+
modules: [path.join(__dirname, 'src'), 'node_modules'],
4949
extensions: ['.js', '.ts']
5050
},
5151

5252
plugins: [
53-
5453
/** Pass variables into modules */
5554
new webpack.DefinePlugin({
5655
NODE_ENV: JSON.stringify(NODE_ENV),
@@ -64,8 +63,8 @@ module.exports = (env, argv) => {
6463
new LicenseWebpackPlugin()
6564
],
6665

67-
module : {
68-
rules : [
66+
module: {
67+
rules: [
6968
{
7069
test: /\.ts$/,
7170
use: [

0 commit comments

Comments
 (0)