mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 05:22:35 +02:00
Update prod build (#572)
* Remove watch from prod build
* x -> X
* bump version for CI
* Revert "bump version for CI"
This reverts commit 2c9d24d82c
.
This commit is contained in:
parent
8e5a56a67a
commit
f9d65d9544
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "codex.editor",
|
"name": "codex.editor",
|
||||||
"version": "2.7.12",
|
"version": "2.7.12",
|
||||||
"description": "Codex Editor. Native JS, based on API and Open Source",
|
"description": "CodeX Editor. Native JS, based on API and Open Source",
|
||||||
"main": "dist/codex-editor.js",
|
"main": "dist/codex-editor.js",
|
||||||
"types": "./types/index.d.ts",
|
"types": "./types/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rimraf dist/* && yarn svg && yarn build:prod",
|
"build": "rimraf dist/* && yarn svg && yarn build:prod",
|
||||||
"build:win": "rimraf dist && yarn svg:win && yarn build:prod",
|
"build:win": "rimraf dist && yarn svg:win && yarn build:prod",
|
||||||
"build:dev": "webpack --mode development --progress --display-error-details --display-entrypoints",
|
"build:dev": "webpack --mode development --progress --display-error-details --display-entrypoints --watch",
|
||||||
"build:prod": "webpack --mode production --progress --display-error-details --display-entrypoints",
|
"build:prod": "webpack --mode production",
|
||||||
"svg:win": "if not exist dist md dist && yarn svg",
|
"svg:win": "if not exist dist md dist && yarn svg",
|
||||||
"svg": "svg-sprite-generate -d src/assets/ -o dist/sprite.svg",
|
"svg": "svg-sprite-generate -d src/assets/ -o dist/sprite.svg",
|
||||||
"pull_tools": "git submodule update --init --recursive"
|
"pull_tools": "git submodule update --init --recursive"
|
||||||
|
|
|
@ -29,6 +29,7 @@ module.exports = (env, argv) => {
|
||||||
entry: {
|
entry: {
|
||||||
'codex-editor': ['@babel/polyfill/noConflict', './src/codex.ts']
|
'codex-editor': ['@babel/polyfill/noConflict', './src/codex.ts']
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, 'dist'),
|
path: path.resolve(__dirname, 'dist'),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
|
@ -36,7 +37,6 @@ module.exports = (env, argv) => {
|
||||||
libraryTarget: 'umd'
|
libraryTarget: 'umd'
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: true,
|
|
||||||
watchOptions: {
|
watchOptions: {
|
||||||
aggregateTimeout: 50
|
aggregateTimeout: 50
|
||||||
},
|
},
|
||||||
|
@ -44,13 +44,12 @@ module.exports = (env, argv) => {
|
||||||
/**
|
/**
|
||||||
* Tell webpack what directories should be searched when resolving modules.
|
* Tell webpack what directories should be searched when resolving modules.
|
||||||
*/
|
*/
|
||||||
resolve : {
|
resolve: {
|
||||||
modules : [path.join(__dirname, 'src'), 'node_modules'],
|
modules: [path.join(__dirname, 'src'), 'node_modules'],
|
||||||
extensions: ['.js', '.ts']
|
extensions: ['.js', '.ts']
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
||||||
/** Pass variables into modules */
|
/** Pass variables into modules */
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
NODE_ENV: JSON.stringify(NODE_ENV),
|
NODE_ENV: JSON.stringify(NODE_ENV),
|
||||||
|
@ -64,8 +63,8 @@ module.exports = (env, argv) => {
|
||||||
new LicenseWebpackPlugin()
|
new LicenseWebpackPlugin()
|
||||||
],
|
],
|
||||||
|
|
||||||
module : {
|
module: {
|
||||||
rules : [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
use: [
|
use: [
|
||||||
|
|
Loading…
Reference in a new issue