0.0.7 • Published 22 days ago

dt-monaco-editor-nls-webpack-plugin v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
22 days ago

dt-monaco-editor-nls-webpack-plugin

nls: National Language Support

This package is designed for utilizing zh-CN in monaco-editor@0.30.1 or monaco-editor@0.31.1.

The Chinese localization JSON file /i18n/dt-zh-hans.json is a simplified version of vscode-loc and This is only relevant to DTStack and it supply the nls.js to replace the monaco-editor/esm/vs/nls.js.

Install

npm install dt-monaco-editor-nls-webpack-plugin -D

Using

const plugin = [
    ...,
    {
        key: 'WebpackPlugin',
        action: 'add',
        opts: {
            name: 'DTMonacoEditorNlsWebpackPlugin',
            fn: () => {
                return new DTMonacoEditorNlsWebpackPlugin();
            },
        },
    }
]
  • webpack.config.js
const DTMonacoEditorNlsWebpackPlugin = require("dt-monaco-editor-nls-webpack-plugin");

module.exports = {
    ...,
    plugins: [new DTMonacoEditorNlsWebpackPlugin()],
    ...,
};

Notice

Our monaco-editor version: 0.30.1 or 0.31.1.

If you need the support zh-CN or other languages, you can fork this repository, locate your json file in vscode-loc and move it to /i18n/***.json. Additionally, you will need to modify the code with the json file path in nls.js.

0.0.7

22 days ago

0.0.6

2 months ago

0.0.5

4 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago