Git Product home page Git Product logo

dt-monaco-editor-nls-webpack-plugin's People

Contributors

liuxy0551 avatar mumiao avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dt-monaco-editor-nls-webpack-plugin's Issues

umi 4.x 中webpack 5 monaco-editor 0.44.0 的打包失败的问题

import MonacoWebpackPlugin from 'monaco-editor-esm-webpack-plugin';
const chainWebpack = (config: any, { webpack }: any) => {
config.plugin('monaco-editor').use(MonacoWebpackPlugin, [
{
languages: ['mysql', 'pgsql', 'sql', 'xml', 'html', 'json', 'freemarker2', 'text'],
},
]);
};

这样配置打包出现
fatal - Error: Parse config file failed: [/Users/vinc/Documents/github/TestHub/client/.umirc.ts]
at Config.getUserConfig (/Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/config/config.js:161:17)
at Config.getUserConfig (/Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/config/config.js:58:19)
at Service.run (/Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/service/service.js:233:37)
at Service.run2 (/Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/service/service.js:65:23)
at /Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/cli/forkedDev.js:23:19
at Object. (/Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/cli/forkedDev.js:36:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12) {
[cause]: Error: Cannot find module 'webpack/lib/NormalModuleReplacementPlugin'
Require stack:

  • /Users/vinc/Documents/github/TestHub/client/node_modules/monaco-editor-esm-webpack-plugin/src/core.js
  • /Users/vinc/Documents/github/TestHub/client/node_modules/monaco-editor-esm-webpack-plugin/index.js
  • /Users/vinc/Documents/github/TestHub/client/.umirc.ts
  • /Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/config/config.js
  • /Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/index.js
  • /Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/service/service.js
  • /Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/cli/forkedDev.js
  • /Users/vinc/Documents/github/TestHub/client/node_modules/umi/bin/forkedDev.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at mod._resolveFilename (/Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/service/requireHook.js:13:26)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object. (/Users/vinc/Documents/github/TestHub/client/node_modules/monaco-editor-esm-webpack-plugin/src/core.js:2:46)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Object.newLoader [as .js] (/Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/utils/compiled/pirates/index.js:1:1684)
    at Module.load (node:internal/modules/cjs/loader:1119:32) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/vinc/Documents/github/TestHub/client/node_modules/monaco-editor-esm-webpack-plugin/src/core.js',
    '/Users/vinc/Documents/github/TestHub/client/node_modules/monaco-editor-esm-webpack-plugin/index.js',
    '/Users/vinc/Documents/github/TestHub/client/.umirc.ts',
    '/Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/config/config.js',
    '/Users/vinc/Documents/github/TestHub/client/node_modules/@umijs/core/dist/index.js',
    '/Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/service/service.js',
    '/Users/vinc/Documents/github/TestHub/client/node_modules/umi/dist/cli/forkedDev.js',
    '/Users/vinc/Documents/github/TestHub/client/node_modules/umi/bin/forkedDev.js'
    ]
    }
    }

兼容性问题

  • 问题一: ?. 的写法在 chrome 66 以下的版本不支持
image
  • 问题二:只有这里针对路径的判断没有兼容 Windows
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.